Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shellscript generators (src/generators) don't wrap variable values between proper quoting #165

Open
hbobenicio opened this issue Feb 12, 2020 · 0 comments

Comments

@hbobenicio
Copy link
Contributor

hbobenicio commented Feb 12, 2020

For example, ATM, this one: https://github.com/worldsibu/hurley/blob/develop/src/generators/cryptofilesgenerator.sh.ts

doesn't wrap the ROOT_DIR between double/single quotes:

ROOT_DIR=${join(__dirname, '../..')}

The side effect of this is that, for example, if your project is located in a directory that has spaces in its path then the hurl new fail with something like:

 [String: '']
  stdout: '',
  stderr: '/bin/bash: line 3: with: command not found\n',
  code: 127,
  cat: [Function: bound ],
  exec: [Function: bound ],
  grep: [Function: bound ],
  head: [Function: bound ],
  sed: [Function: bound ],
  sort: [Function: bound ],
  tail: [Function: bound ],
  to: [Function: bound ],
  toEnd: [Function: bound ],
  uniq: [Function: bound ] }
[hurley] - Found error while running script!
(node:25055) UnhandledPromiseRejectionWarning: Error: Errors found in script, stopping execution
    at Object.<anonymous> (/dir with space/myapp/node_modules/@worldsibu/hurley/dist/utils/sysWrapper.js:119:27

after moving the project to another directory that does not have spaces in its path then the command hurl new works as expected.

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

No branches or pull requests

1 participant