snok / install-poetry

Github action for installing and configuring Poetry
MIT License
572 stars 53 forks source link

How to change working-directory ? #139

Closed Yasu-umi closed 9 months ago

Yasu-umi commented 9 months ago

Is it possible to add a feature to change the directory where poetry install is executed with an optional argument like working-directory ?

sondrelg commented 9 months ago

If you set the POETRY_HOME environment variable, it should be respected I believe. See https://github.com/snok/install-poetry/issues/127 :+1:

Yasu-umi commented 9 months ago

Thanks a lot!

Yasu-umi commented 9 months ago

@sondrelg Sorry, I misunderstood answer. I'm looking for a way to change the path where 'poetry install' is executed, not where poetry is installed. For example, if pyproject.toml & poetry.lock are not in / but in app/, how can I run poetry install in app/ ?

Yasu-umi commented 9 months ago

I was completely mistaken.. snok/install-poetry does not run poetry install, so this issue was meaningless.

miigotu commented 9 months ago

Just in case this helps or someone else checks this in the future:

    - name: poetry install
      working-directory: /app
      run: poetry install