ponylang / ponyup

The Pony toolchain multiplexer
BSD 2-Clause "Simplified" License
193 stars 13 forks source link

Add `$PONYUP_PREFIX` as another option to point ponyup's prefix #247

Open viscropst opened 1 year ago

viscropst commented 1 year ago

Title.For easier to deploy the development environment and runtime enviroment, user can set this environment variable before running the ponyup or shell and use the ponyup with prefix as $PONYUP_PREFIX until the variable was unset, if user wants to use other than $PONYUP_PREFIX for once, they can use --prefix to change the prefix.

jemc commented 1 year ago

We briefly mentioned this in today's sync call and this makes sense to me. :+1:

SeanTAllen commented 1 year ago

What is the specific issue that you ran into that this solves?

viscropst commented 1 year ago

For me, I'm creating and using a tool that setting the every environment I want and run my editor for portable use(eg. setting up a pony environment before running the vscode whatever OS re-installed or change the OS) without virtualization tech. For persent ponyup I can't using a more better option than modifing the batch file generated by ponyup or wrapping the ponyup batch with --prefix arg when I placed the ponyup prefix out of default place and using this place for daily ponyup use.

SeanTAllen commented 1 year ago

More questions:

OR

viscropst commented 1 year ago

Sorry for late answering.If ponyup acts like rustup's role in ponylang,It's yes to installing the ponyup binary to a single location then use different location for toolchain binaries.

SeanTAllen commented 1 year ago

Would you be installing multiple versions of pony tools in each location or a single version?

viscropst commented 1 year ago

For my preference I would like to install multiple versions of pony tools in each location.

SeanTAllen commented 1 year ago

Rather than overriding prefix, this should be an option to override the default location to look look for/install the ponyp directory. So that the default_root can be overridden and then there's no oddness with interacting with the prefix option.

https://github.com/ponylang/ponyup/blob/main/cmd/main.pony#L17

Note to anyone who works on this, there should be some level of testing around this working so it doesn't get broken in the future.