aws-cli
aws-cli copied to clipboard
aws/install reports "No such file or directory" when `dirname "$@"` contains a space
Describe the bug
See title.
Expected Behavior
Silent success.
Current Behavior
aws/install: line 78: /tmp/foo: No such file or directory
Seems to succeed, though.
Reproduction Steps
mkdir /tmp/foo\ bar
mv aws /tmp/foo\ bar/
cd /tmp/foo\ bar/
aws/install -i ~/.local/aws-cli -b ~/.local/bin
Possible Solution
Looks like $INSTALLER_EXE
should be quoted as "$INSTALLER_EXE
here: https://github.com/aws/aws-cli/blob/b855674c84cfd416a626cbb24edf8d103241b945/exe/assets/install#L78
Additional Information/Context
No response
CLI version used
aws-cli/2.6.4 Python/3.9.11 Linux/5.15.15-1rodete2-amd64 exe/x86_64.debian prompt/off
Environment details (OS name and version, etc.)
Linux (Debian) 5.15.15
Hi @tamird, Thank you for submitting the issue. While this seems to lean to problems related to locale/ system configuration, could you please share the following:
- Debug logs by adding
--debug
to the commands - System locale
That doesn't seem relevant. Any space in the path on any system will produce this.
@tamird I think this may be a duplicate of https://github.com/aws/aws-cli/issues/6852. Can you confirm?
Sure, it might be. This issue contains a proposed solution, though.