From fa3a7d774afb4c622511f4a4ec9be11b3ceecbe8 Mon Sep 17 00:00:00 2001 From: Guido Scheffler Date: Thu, 23 Jan 2020 20:51:52 +0100 Subject: [PATCH] support spaces in path to husky.local.sh (#658) * support spaces in path to husky.local.sh added quotes to achieve that * updates snapshot test --- sh/husky.sh | 2 +- src/installer/__tests__/__snapshots__/scripts.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/husky.sh b/sh/husky.sh index b8d044a73..1b774325d 100644 --- a/sh/husky.sh +++ b/sh/husky.sh @@ -53,7 +53,7 @@ if [ "$HUSKY_SKIP_HOOKS" = "true" ] || [ "$HUSKY_SKIP_HOOKS" = "1" ]; then fi # Source user var and change directory -. "$(dirname $0)/husky.local.sh" +. "$(dirname "$0")/husky.local.sh" debug "Current working directory is $(pwd)" # Skip fast if hookName is not defined diff --git a/src/installer/__tests__/__snapshots__/scripts.ts.snap b/src/installer/__tests__/__snapshots__/scripts.ts.snap index 250abdcfa..410c1a1c0 100644 --- a/src/installer/__tests__/__snapshots__/scripts.ts.snap +++ b/src/installer/__tests__/__snapshots__/scripts.ts.snap @@ -82,7 +82,7 @@ if [ \\"$HUSKY_SKIP_HOOKS\\" = \\"true\\" ] || [ \\"$HUSKY_SKIP_HOOKS\\" = \\"1\ fi # Source user var and change directory -. \\"$(dirname $0)/husky.local.sh\\" +. \\"$(dirname \\"$0\\")/husky.local.sh\\" debug \\"Current working directory is $(pwd)\\" # Skip fast if hookName is not defined