aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

aws/install reports "No such file or directory" when `dirname "$@"` contains a space

Open tamird opened this issue 2 years ago • 4 comments

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

tamird avatar May 11 '22 20:05 tamird

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

aaoswal avatar May 12 '22 18:05 aaoswal

That doesn't seem relevant. Any space in the path on any system will produce this.

tamird avatar May 12 '22 18:05 tamird

@tamird I think this may be a duplicate of https://github.com/aws/aws-cli/issues/6852. Can you confirm?

tim-finnigan avatar Nov 10 '22 18:11 tim-finnigan

Sure, it might be. This issue contains a proposed solution, though.

tamird avatar Nov 10 '22 19:11 tamird