Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Minor issue in hc-happ-scaffold script #174

Open
comcmipi opened this issue Aug 27, 2020 · 0 comments
Open

Minor issue in hc-happ-scaffold script #174

comcmipi opened this issue Aug 27, 2020 · 0 comments

Comments

@comcmipi
Copy link

comcmipi commented Aug 27, 2020

The hc-happ-scaffold script takes 2 parameters: PATH_TO_JSON_TYPE_SPEC and PATH_TO_NEW_HAPP_DIRECTORY. On the second line script checks for existence of the JSON_TYPE_SPEC file as:

${1?"Command Usage Error: ARG 1 - PATH TO SCHEMA REQUIRED"}

If the file does not exist script exits, as it should. If the files exists though, script returns an error, e.g.

/nix/store/b0s1949hkla53xkhg6zp43xfid8i35rl-hc-happ-scaffold/bin/hc-happ-scaffold: line 2: my-type-spec.json: command not found

as it tries to execute the file, which is obviously not desired. A possible fix would be to change the line to a dummy variable assignment, i.e.:

_=${1?"Command Usage Error: ARG 1 - PATH TO SCHEMA REQUIRED"}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant