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

Unable to use '~' in virtualenvs-path from v1.2.0 #54

Closed
JaimeLennox opened this issue Oct 1, 2021 · 5 comments
Closed

Unable to use '~' in virtualenvs-path from v1.2.0 #54

JaimeLennox opened this issue Oct 1, 2021 · 5 comments

Comments

@JaimeLennox
Copy link

Hello!

We recently updated to v1.2.0 and found that our virtualenvs were being put in the wrong place; instead of ~/.cache/virtualenvs they were being put into <project-dir>/~/.cache/virtualenvs.

Our action looked like this:

      - name: Install and configure poetry
        uses: snok/install-poetry@v1.2.0
        with:
          virtualenvs-in-project: false
          virtualenvs-path: ~/.cache/virtualenvs

I did a bit of investigation and I think this is due to the github input being directly quoted: https://github.com/snok/install-poetry/blob/main/action.yml#L62, whereas previously it was not quoted before being passed to the script: https://github.com/snok/install-poetry/blob/v1.1.8/action.yml#L40, which allowed the shell to expand it.

I can of course hardcode the home directory instead of using ~ but this seems like a common case, so would it be worth changing this to allow expansion again?

@sondrelg
Copy link
Member

sondrelg commented Oct 1, 2021

Thanks for reporting this @JaimeLennox 👏

Yes I agree we should fix this. Would you be interested in trying to create a PR with a fix? Think we would need a test-case in the test workflow and an appropriate change in logic and that should be it 🙂

If you don't have time, I'll most likely fix this over the weekend!

@JaimeLennox
Copy link
Author

Thanks for the quick response! I'll probably not have time today but might be able to take a look next week if you haven't got to it by then already 😄

@sondrelg
Copy link
Member

sondrelg commented Oct 1, 2021

I'll take a look at it then 👍 Looks like the problem is probably what you said, re https://github.com/koalaman/shellcheck/wiki/SC2088

@sondrelg
Copy link
Member

sondrelg commented Oct 1, 2021

I released a new version now @JaimeLennox. If you get time, please let me know whether it resolved your issue 🙂

@JaimeLennox
Copy link
Author

Yep, looks good! Working perfectly, thanks 😄

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

No branches or pull requests

2 participants