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

Add PLZ_ARGS variable to pleasew #1252

Merged
merged 2 commits into from
Sep 30, 2020

Conversation

sagikazarmark
Copy link
Contributor

When running please in a CI environment, copying the same arguments between scripts is error prone and tedious.

Setting a global PLZ_ARGS environment variable that's automatically in every invocation is a nice way around that. For example, setting plain output for every CI step is a good practice.

I realized this might not be the absolute best solution, but it's a start and can be the start of a discussion.

pleasew Outdated
@@ -69,4 +69,4 @@ for x in `ls "$DIR"`; do
done
ln -sf "${DIR}/please" "${LOCATION}/plz"
echo -e >&2 "${GREEN}Should be good to go now, running plz...${RESET}"
exec "$TARGET" "$@"
exec "$TARGET" "$PLZ_ARGS" "$@"
Copy link
Member

Choose a reason for hiding this comment

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

This is an error if it's undefined? (we set +u at the top of the script)

I think something like "${PLZ_ARGS+}" would help, but we also need to be sure it doesn't inject a spurious empty string into the arguments. Maybe just ${PLZ_ARGS+} would do it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Silly me, I haven't actually tried it without $PLZ_ARGS 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think ${PLZ_ARGS:-} will be the right syntax here.

@sagikazarmark
Copy link
Contributor Author

The breaking CI does not seem to be related.

@Tatskaari
Copy link
Member

The breaking CI does not seem to be related.

I think you might just need to merge master in. I fixed the up to date failures yesterday.

@sagikazarmark
Copy link
Contributor Author

I rebased from master this morning.

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@Tatskaari Tatskaari merged commit 339edad into thought-machine:master Sep 30, 2020
@sagikazarmark sagikazarmark deleted the plz-args branch September 30, 2020 17:07
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.

None yet

3 participants