Skip to content

Conversation

@ezeike
Copy link
Collaborator

@ezeike ezeike commented Jul 17, 2025

-Banner
-Setup config saving

echo "Welcome to Canopy Setup!"
echo

CONFIG_FILE=setup.conf
Copy link
Contributor

Choose a reason for hiding this comment

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

You should add an example of this file in the repo

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do if we like this approach.

setup.sh Outdated
}

# Function to save config to a file
save_config() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this function is not idempotent, although the setup is meant to be ran once, I think we should protect against people who may want to use this as a way to update their files (or may run it multiple times if they're having issues for whatever reason)

Copy link
Collaborator

Choose a reason for hiding this comment

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

digging more into the code there's an autoload option so even more reasons to make this idempotent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes the config file is only overwritten if the user opts to enter the values again.

The main purpose was for headless installs and running multiple times. Thinking again however I think we can remove the save functionality altogether and just have it read the file if it is present.

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