Skip to content

Is there a way to access workspace files during feature execution? #404

Answered by joshspicer
nikaro asked this question in Q&A
Discussion options

You must be logged in to vote

That's true that lifecycle hooks don't have access to Feature arguments - that sounds like a helpful feature request, and would be useful in this scenario.

One way I can think to do this today is similar to how the git-lfs Feature works, writing the lifecycle hook script in the install.sh and injecting the relevant Feature's options. That script is then run as a postCreate hook once the filesystem is mounted.

Note the usage of both EOF and 'EOF' to control when variables are substituted or not (https://unix.stackexchange.com/questions/138418/passing-a-variable-to-a-bash-script-that-uses-eof-and-considers-the-variable-a)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@nikaro
Comment options

@joshspicer
Comment options

Answer selected by nikaro
@joshspicer
Comment options

@nikaro
Comment options

@nikaro
Comment options

@joshspicer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants