Skip to content

Fix home directories with spaces in the path#3

Open
nicolaschan wants to merge 2 commits intoBerriAI:mainfrom
nicolaschan:main
Open

Fix home directories with spaces in the path#3
nicolaschan wants to merge 2 commits intoBerriAI:mainfrom
nicolaschan:main

Conversation

@nicolaschan
Copy link

When the home directory path has a space in the path we get an error like this:

https://github.com/ishaan-jaff/clerkie-cli/archive/refs/tags/v0.0.2-beta.zip
main: line 14: cd: too many arguments
downloading latest release in /home/nicolas/foo bar//.clerkie-cli
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to open the file /home/nicolas/foo: Is a directory
100   512    0   512    0     0    578      0 --:--:-- --:--:-- --:--:--  2081
curl: (23) Failure writing output to destination
curl: (6) Could not resolve host: bar
main: line 42: err: command not found
chmod: cannot access 'bar//.clerkie-cli/release.zip': No such file or directory
unzip:  cannot find or open /home/nicolas/foo, /home/nicolas/foo.zip or /home/nicolas/foo.ZIP.
rm: cannot remove '/home/nicolas/foo': Is a directory
rm: cannot remove 'bar//.clerkie-cli/release.zip': No such file or directory
installed clerkie and unzipped
renaming bar/
Clerkie Installed. Open a new Terminal Window to start using

This PR fixes this error by properly quoting all variables. I also fix other shellcheck linting issues and add a GitHub action to automatically check the install script for linting issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants