ponyup icon indicating copy to clipboard operation
ponyup copied to clipboard

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

Open viscropst opened this issue 2 years ago • 8 comments
trafficstars

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.

viscropst avatar Feb 20 '23 02:02 viscropst

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

jemc avatar Feb 21 '23 19:02 jemc

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

SeanTAllen avatar Feb 21 '23 19:02 SeanTAllen

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.

viscropst avatar Feb 22 '23 01:02 viscropst

More questions:

  • Would you want to have a single ponyup binary that is installed in a single location and then use that with different installation locations for binaries it installed?

OR

  • Would you be wanting to install different ponyup binaries in different locations and each of those has its own install location?

SeanTAllen avatar Feb 22 '23 02:02 SeanTAllen

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.

viscropst avatar Feb 22 '23 12:02 viscropst

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

SeanTAllen avatar Feb 22 '23 12:02 SeanTAllen

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

viscropst avatar Feb 22 '23 15:02 viscropst

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.

SeanTAllen avatar Feb 25 '23 19:02 SeanTAllen