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

Output interactive mode env to a file #520

Merged
merged 9 commits into from
Jul 28, 2021
Merged

Conversation

kmazurek
Copy link
Contributor

@kmazurek kmazurek commented Jul 13, 2021

Resolves #518

This change makes interactive mode output its environment variables to a file (which can be sourced), rather than print them out to the console. Example of the file's contents:

export PATH=/tmp/tmpx7o16vhf:$PATH
export YAGNA_APPKEY=a70facb9501d4528a77f25574ab0f11d
export YAGNA_API_URL=http://172.19.0.6:6000
export GSB_URL=tcp://172.19.0.6:6010

Known limitations

  • there's no support for Windows, adding it would significantly increase complexity due to how PATH extensions are handled
  • each time the file is sourced the gftp script directory is appended to the PATH variable
  • subnet tag currently cannot be set through an env variable (perhaps it should be possible?) added to yapapi in Make engine params configurable via env variables yapapi#546

Possible additions

  • revisit/improve extending the PATH variable done
  • add an integration test for the interactive mode done
  • mention the "new way" in readme/docs done

@kmazurek kmazurek marked this pull request as ready for review July 14, 2021 15:06
Copy link
Contributor

@azawlocki azawlocki left a comment

Choose a reason for hiding this comment

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

I would be really grateful if you left the old way of starting the requestor script as an alternative to source'ing the .env file.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@azawlocki azawlocki self-requested a review July 27, 2021 06:56
Copy link
Contributor

@azawlocki azawlocki left a comment

Choose a reason for hiding this comment

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

LGTM!

@kmazurek kmazurek force-pushed the km/interactive-to-file branch 2 times, most recently from 93233f6 to df9bf01 Compare July 27, 2021 19:31
@kmazurek kmazurek force-pushed the km/interactive-to-file branch from df9bf01 to 02d6e9b Compare July 27, 2021 19:35
@kmazurek kmazurek merged commit 4868dd2 into master Jul 28, 2021
@kmazurek kmazurek deleted the km/interactive-to-file branch July 28, 2021 15:37
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.

Output interactive mode environment to a file
2 participants