Skip to content

Commit 89c8cfe

Browse files
authored
fix: shell scripts in templates (#73)
Fix script Signed-off-by: Todd Baert <[email protected]>
1 parent b424678 commit 89c8cfe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libs/hooks/open-telemetry/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"access": "public"
1212
},
1313
"scripts": {
14-
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ $(npm show $npm_package_name@$npm_package_version version) = $(npm run current-version -s) ]; then echo 'already published, skipping'; else npm publish --access public; fi",
14+
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
1515
"current-version": "echo $npm_package_version"
1616
},
1717
"license": "Apache-2.0"

libs/providers/go-feature-flag/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@openfeature/nodejs-sdk": "^0.0.1"
77
},
88
"scripts": {
9-
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ $(npm show $npm_package_name@$npm_package_version version) = $(npm run current-version -s) ]; then echo 'already published, skipping'; else npm publish --access public; fi",
9+
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
1010
"current-version": "echo $npm_package_version"
1111
}
1212
}

tools/generators/open-feature/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function updatePackage(tree: Tree, projectRoot: string) {
170170
updateJson(tree, joinPathFragments(projectRoot, 'package.json'), (json) => {
171171
json.scripts = {
172172
'publish-if-not-exists':
173-
"cp $NPM_CONFIG_USERCONFIG .npmrc && if [ $(npm show $npm_package_name@$npm_package_version version) = $(npm run current-version -s) ]; then echo 'already published, skipping'; else npm publish --access public; fi",
173+
'cp $NPM_CONFIG_USERCONFIG .npmrc && if [ "$(npm show $npm_package_name@$npm_package_version version)" = "$(npm run current-version -s)" ]; then echo \'already published, skipping\'; else npm publish --access public; fi',
174174
'current-version': 'echo $npm_package_version',
175175
};
176176

0 commit comments

Comments
 (0)