Giter Site home page Giter Site logo

Add input for POETRY_HOME about install-poetry HOT 10 CLOSED

snok avatar snok commented on June 11, 2024
Add input for POETRY_HOME

from install-poetry.

Comments (10)

miigotu avatar miigotu commented on June 11, 2024 1

Opps that was a typo lol, editing that.

from install-poetry.

sondrelg avatar sondrelg commented on June 11, 2024

A PR for this is very welcome 👏 Thanks @linkous8

from install-poetry.

linkous8 avatar linkous8 commented on June 11, 2024

Unfortunately, implementing this was not as straight forward as I thought it would be, the tests are all blowing up when run in my local repo: https://github.com/linkous8/install-poetry/actions/runs/994929613

Do you have any recommendations where I might be going wrong? If not, I can close out the PR to remove the needless clutter

from install-poetry.

sondrelg avatar sondrelg commented on June 11, 2024

Do they pass if you undo the changes? Or do they possibly fail because you're running the tests in a fork? 🙂

To give you some context: The reason I ended up setting the POETRY_HOME variable was because the Github action runners are inconsistent. If I remember correctly mac runners sometimes use ~/.local and sometime uses ~/Library/Application.

I can take a better look at it tomorrow if that doesn't help you 👍

from install-poetry.

sondrelg avatar sondrelg commented on June 11, 2024

Might be a good idea to comment out most of the tests when experimenting btw 🙂 I usually just keep one or two until I get it to work then comment the rest back in - otherwise it takes forever

from install-poetry.

sondrelg avatar sondrelg commented on June 11, 2024

In the final test run it looks like the condition isn't working

python3: can't open file 'default': [Errno 2] No such file or directory

Looks like it's just setting "default"

from install-poetry.

linkous8 avatar linkous8 commented on June 11, 2024

Right, I have a conditional to set the path variable but its not working correctly for some reason:

https://github.com/snok/install-poetry/pull/40/files#diff-61368e2b75f4523e4d83149b45fae042b666e423a7d6455784a0a3519351064eR37

from install-poetry.

miigotu avatar miigotu commented on June 11, 2024

@linkous8 why not make the default an empty string?

  poetry-home:
    description: "The Poetry installation path"
    required: false
    default: ""
if [ -z "$poetry_home" ]; then
  if [ "$os" == "Windows" ]; then
    path="C:/Users/runneradmin/AppData/Roaming/Python/Scripts/"
  else
    path="$HOME/.local/"
  fi
else
  path="$poetry_home_path"
fi

from install-poetry.

sondrelg avatar sondrelg commented on June 11, 2024

That seems sensible 🙂

Would this make sense @miigotu

if [ -z "$poetry_home" ]; then
  if [ "$os" == "Windows" ]; then
    path="C:/Users/runneradmin/AppData/Roaming/Python/Scripts/"
  else
    path="$HOME/.local/"
  fi
else
  path="$poetry_home_path"
fi

Or does the second path="$HOME/.local/" have a purpose?

from install-poetry.

linkous8 avatar linkous8 commented on June 11, 2024

Opted for an alternative approach to caching, I no longer need support for this

from install-poetry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.