Skip to content

Add --post-install-file option to init subcommand too#496

Open
Cyberbeni wants to merge 1 commit intoswiftlang:mainfrom
Cyberbeni:post_init_script
Open

Add --post-install-file option to init subcommand too#496
Cyberbeni wants to merge 1 commit intoswiftlang:mainfrom
Cyberbeni:post_init_script

Conversation

@Cyberbeni
Copy link

partial fix for #396

Someone will also have to update the website to suggest using this option after a version has been released: https://www.swift.org/install/linux/

I couldn't get it to build due to error: 'archive.h' file not found but the new code shouldn't have any issues.

@cmcgee1024
Copy link
Member

Thank you for raising this issue and tackling the problem. I've been considering a different approach.

The outputted post install command from swiftly init and swiftly install can get lost in a terminal buffer. The post install file can similarly be lost or forgotten.

What would be better is something that's more durable, where the user can request it on-demand at any time. If there was a subcommand for swiftly that's responsible for checking system dependency mismatches, and optionally running a command (likely under sudo) to bring in those dependencies could be a better user experience. The swiftly init workflow could reuse that functionality too, and if it were to fail for any reason, then the user is directed to this system dependency management subcommand.

Some consideration will be needed in allowing only certain types of commands to be run as root. Perhaps an allow-list or regular expression could help there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants