From 7e7ab4275df8567caba8e7d97b9d0e268c782f3f Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Fri, 11 Mar 2022 21:23:52 +0000 Subject: [PATCH 1/2] fix: gitpod launching sasjs --- .gitpod.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 47c1990..b825a64 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,7 +1,7 @@ tasks: - - init: | - nvm install --lts - npm i -g @sasjs/cli + - init: npm install -g npm + - command: npm i + - command: npm i -g @sasjs/cli image: file: .gitpod.dockerfile @@ -24,4 +24,4 @@ github: # add a "Review in Gitpod" button to pull requests (defaults to false) addBadge: false # add a label once the prebuild is ready to pull requests (defaults to false) - addLabel: prebuilt-in-gitpod \ No newline at end of file + addLabel: prebuilt-in-gitpod From 23dbda302ea06b5f899fce02e949de360cca659a Mon Sep 17 00:00:00 2001 From: Allan Bowe Date: Fri, 11 Mar 2022 21:24:34 +0000 Subject: [PATCH 2/2] fix: ensuring pre-commit fails when sasjs lint fails --- .git-hooks/pre-commit | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 3d00ad3..6e431bf 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -1,5 +1,12 @@ #!/bin/bash -sasjs lint + +# Ensure lint is passing +LINT=`sasjs lint` +if [[ "$LINT" != "✔ All matched files use @sasjs/lint code style!" ]]; then + echo "$LINT" + echo "To commit in spite of these warnings, use the -n parameter." + exit 1 +fi # Avoid commits to the master branch BRANCH=`git rev-parse --abbrev-ref HEAD`