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

Ability to send option flags to post-install script #882

Closed
2 tasks done
mrclary opened this issue Oct 25, 2024 · 3 comments · Fixed by #885
Closed
2 tasks done

Ability to send option flags to post-install script #882

mrclary opened this issue Oct 25, 2024 · 3 comments · Fixed by #885
Labels
type::feature request for a new feature or capability

Comments

@mrclary
Copy link

mrclary commented Oct 25, 2024

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

@jaimergp,
Is there a way for the post-install script to determine whether the installer is running in silent (.exe with /S) or batch (.sh with -b) mode?

Otherwise, is it possible to implement a feature in which command-line arguments provided to the installer (.exe, .sh or .pkg) are passed to the post-install script?

Why is this needed?

For our Spyder installer, the post-install script is designed to launch Spyder automatically upon completing the install. It is desirable to forego this behavior if the Spyder installer is executed from the command-line in either batch or silent mode.

The ability to pass command-line arguments to the post-install script could provide more flexibility for developers that use the post-install script.

What should happen?

No response

Additional Context

spyder-ide/spyder#22730

@mrclary mrclary added the type::feature request for a new feature or capability label Oct 25, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Oct 25, 2024
@jaimergp
Copy link
Contributor

Is there a way for the post-install script to determine whether the installer is running in silent (.exe with /S) or batch (.sh with -b) mode?

Not currently, I'm afraid. We would need to export (and/or pass) some variables like INSTALLER_NAME and the like.

is it possible to implement a feature in which command-line arguments provided to the installer (.exe, .sh or .pkg) are passed to the post-install script?

This is trickier to do cross-platform. Might be trivial for .sh installers, tricky for .exe and almost impossible for .pkg. If all you need is to detect whether the installer is being run in silent, I think that's way easier.

@mrclary
Copy link
Author

mrclary commented Oct 28, 2024

This is trickier to do cross-platform. Might be trivial for .sh installers, tricky for .exe and almost impossible for .pkg. If all you need is to detect whether the installer is being run in silent, I think that's way easier.

I understand regarding .pkg, but macOS platforms could also use a .sh as an alternative. Having the feature for just .sh and .exe would be really nice. However, I only need to detect silent/batch mode for my current issue (spyder-ide/spyder#22730).

@jaimergp
Copy link
Contributor

Added #885

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature request for a new feature or capability
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants