Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

enabled p2-exec to run with env#1118

Open
yzaccc wants to merge 1 commit intosquare:masterfrom
yzaccc:yangzongkun/integrate-signalfx-p2hook-with-stats-collector
Open

enabled p2-exec to run with env#1118
yzaccc wants to merge 1 commit intosquare:masterfrom
yzaccc:yangzongkun/integrate-signalfx-p2hook-with-stats-collector

Conversation

@yzaccc
Copy link

@yzaccc yzaccc commented Mar 14, 2019

No description provided.

}

for _, env := range args.Envs {
cmd = append(cmd, "env", env)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should "env" be "--env"?

Copy link
Author

Choose a reason for hiding this comment

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

No, we are using this way to modify the environment before executing a p2 hook launchable, and it works.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these traditional environment variables that are being added or are these truly just additional arguments that happen to be similar in name? Examples of traditional environment variable usage from my perspective:

~ export ABC=123
~ command_that_uses_abc

# or
~ API_KEY=xxx my_awesome_command

Copy link
Author

@yzaccc yzaccc Mar 15, 2019

Choose a reason for hiding this comment

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

the env here is for adding the traditional environment variables for the commands. like
~ my_awesome_command env API_KEY=xxx
which equals to:
~ API_KEY=xxx my_awesome_command

Copy link
Collaborator

Choose a reason for hiding this comment

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

So it is a custom argument that we turn into environment variables?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants