99designs / aws-vault

A vault for securely storing and accessing AWS credentials in development environments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/etc/zshrc:7: command not found: locale [v6.6.1] M1 Apple Silicon ZSH

Smuger opened this issue · comments

Previously mentioned: Issue 744
Commit tagged as a fix for this: v6.6.1 106991e

@mtibben If you have some free time can you have a look?

Users experiencing similar issue before:
tomgilligan
moltar

  • I am using the latest release of AWS Vault [v6.6.1]
  • I have provided my .aws/config (redacted if necessary)
  • I have provided the debug output using aws-vault --debug (redacted if necessary)
  • I run M1 Pro Apple Silicon Ventura 13.1

.aws/config


[default]
region=eu-west-2
output=json

[profile sec]
mfa_serial=arn:aws:iam::X:mfa/Krzysztof.Kwietniewski@X

[profile sand]
source_profile=sec
mfa_serial=arn:aws:iam::X:mfa/Krzysztof.Kwietniewski@X
role_arn=arn:aws:iam::X:role/allow-full-access-from-other-accounts

aws-vault --debug


aws-vault exec sec --backend=pass --duration=12h --debug                                                             

2023/01/04 10:24:16 aws-vault v6.6.1
2023/01/04 10:24:16 Loading config file /Users/krzysztofkwietniewski/.aws/config
2023/01/04 10:24:16 Parsing config file /Users/krzysztofkwietniewski/.aws/config
2023/01/04 10:24:16 [keyring] Considering backends: [pass]
2023/01/04 10:24:16 profile sec: using stored credentials
2023/01/04 10:24:16 profile sec: using GetSessionToken (with MFA)
2023/01/04 10:24:16 Re-using cached credentials X from sts.GetSessionToken, expires in 17m53.574585s
2023/01/04 10:24:16 Setting subprocess env: AWS_DEFAULT_REGION=eu-west-2, AWS_REGION=eu-west-2
2023/01/04 10:24:16 Setting subprocess env: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
2023/01/04 10:24:16 Setting subprocess env: AWS_SESSION_TOKEN, AWS_SECURITY_TOKEN
2023/01/04 10:24:16 Setting subprocess env: AWS_SESSION_EXPIRATION
2023/01/04 10:24:16 Exec command /bin/zsh 
2023/01/04 10:24:16 Found executable /bin/zsh
/etc/zshrc:7: command not found: locale

Issue description:


  1. Command:

After running:

aws-vault exec sec --backend=pass --duration=12h --debug

I receive

/etc/zshrc:7: command not found: locale
  1. Corrupted terminal

After running the above command, the terminal appears to forget how to be a terminal.

command not found (On nearly all basic functionality such as 'ls' or 'cd')

image

  1. /etc/zshrc:7

looks to be the first mention of any program call (in this case code is trying to run locale)

So I don't think this has anything to do with that script. It's more of a ZSH wrong console issue.

image

Let me know if you have any questions. I'll try to respond as soon as possible 😄

Problem fixed

Solution:
Check your ~/.zshenv, mine had incorrect Python paths set up there.

how to open ~/.zshenv file in mac?