Skip to content

Conversation

@mheadd
Copy link
Contributor

@mheadd mheadd commented Feb 2, 2022

Eval and run command strings rather than exec.

Changes proposed in this pull request:

  • Carries over changes made to the main branch to the v7 branch, using the same approach in both branches.
  • Eval command strings
  • Exit process with cf exit code

Security considerations

Removes exec in favor of eval.

Eval and run command strings rather than exec.
@mheadd
Copy link
Contributor Author

mheadd commented Feb 2, 2022

@mogul want you to review prior to merging.

@mogul
Copy link
Contributor

mogul commented Feb 2, 2022

How does the exit value get returned? Don't you need to exit $??

@mogul
Copy link
Contributor

mogul commented Feb 2, 2022

Also I don't have enough context... Why avoid exec?

@mheadd
Copy link
Contributor Author

mheadd commented Feb 2, 2022

@mogul You had approved the same change in the main branch, so wanted to make sure that the v7 branch, which I know data.gov makes use of, was consistent.

Copy link
Contributor

@mogul mogul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving since it's just porting the change over from the other branch, but it seems like it might be better/safer to use a subshell to get around quoting issues.
https://stackoverflow.com/questions/17529220/why-should-eval-be-avoided-in-bash-and-what-should-i-use-instead

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

Successfully merging this pull request may close these issues.

3 participants