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

feat: allow for additional activation scripts #263

Closed

Conversation

ruben-arts
Copy link
Collaborator

Allow the activator to receive additional activation scripts from the user

@@ -40,6 +40,9 @@ pub struct ActivationVariables {

/// The type of behaviour of what should happen with the defined paths.
pub path_modification_behaviour: PathModificationBehaviour,

/// Paths to additional activation scripts
pub additional_activation_scripts: Option<Vec<PathBuf>>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can just be Vec right?

@wolfv
Copy link
Contributor

wolfv commented Jul 14, 2023

I am wondering if this is better vs. cloning the "activator" struct and adding the additional scripts along the way, like:

Activator<Bash> full_act = {
  activation_scripts: a.activation_scripts.chain(extra_activation_scripts),
  ...a
};

Then we don't need to add extra fields. We might also have to handle extra-deactivation scripts otherwise.

@ruben-arts ruben-arts closed this Jul 14, 2023
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.

3 participants