Skip to content

Commit aabd390

Browse files
klmdbtypicode
authored andcommitted
Fix whitespace in project folder name issue (#423)
Co-Authored-By: klmdb <[email protected]>
1 parent d43f813 commit aabd390

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/installer/__tests__/__snapshots__/getScript.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ if ! command -v node >/dev/null 2>&1; then
2828
echo \\"Can't find node in PATH, trying to find a node binary on your system\\"
2929
fi
3030
31-
if [ -f $scriptPath ]; then
31+
if [ -f \\"$scriptPath\\" ]; then
3232
if [ -f ~/.huskyrc ]; then
3333
debug \\"source ~/.huskyrc\\"
3434
source ~/.huskyrc
3535
fi
36-
node_modules/run-node/run-node $scriptPath $hookName \\"$gitParams\\"
36+
node_modules/run-node/run-node \\"$scriptPath\\" $hookName \\"$gitParams\\"
3737
else
3838
echo \\"Can't find Husky, skipping $hookName hook\\"
3939
echo \\"You can reinstall it using 'npm install husky --save-dev' or delete this hook\\"
@@ -65,12 +65,12 @@ debug() {
6565
6666
debug \\"$hookName hook started...\\"
6767
68-
if [ -f $scriptPath ]; then
68+
if [ -f \\"$scriptPath\\" ]; then
6969
if [ -f ~/.huskyrc ]; then
7070
debug \\"source ~/.huskyrc\\"
7171
source ~/.huskyrc
7272
fi
73-
node $scriptPath $hookName \\"$gitParams\\"
73+
node \\"$scriptPath\\" $hookName \\"$gitParams\\"
7474
else
7575
echo \\"Can't find Husky, skipping $hookName hook\\"
7676
echo \\"You can reinstall it using 'npm install husky --save-dev' or delete this hook\\"

src/installer/getScript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ fi
6363
`
6464
: ''
6565
}
66-
if [ -f $scriptPath ]; then
66+
if [ -f "$scriptPath" ]; then
6767
if [ -f ${huskyrc} ]; then
6868
debug "source ${huskyrc}"
6969
source ${huskyrc}
7070
fi
71-
${node} $scriptPath $hookName "$gitParams"
71+
${node} "$scriptPath" $hookName "$gitParams"
7272
else
7373
echo "Can't find Husky, skipping $hookName hook"
7474
echo "You can reinstall it using 'npm install husky --save-dev' or delete this hook"

0 commit comments

Comments
 (0)