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(personality): Allow state filename customization #416

Merged
merged 2 commits into from
May 27, 2024

Conversation

thp-canonical
Copy link
Contributor

Make it possible to customize the state file name, which is part of the personality (application name, pebble dir, ...).

Copy link
Contributor

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me. Just one question.

@@ -22,3 +22,6 @@ var DisplayName string = "Pebble"

// DefaultDir is the Pebble directory used if $PEBBLE is not set.
var DefaultDir string = "/var/lib/pebble/default"

// StateFile is the file name of the state file in pebble dir.
var StateFile string = ".pebble.state"
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess having a separate StateFile variable is better than using "."+ProgramName+".state"?

Copy link
Contributor Author

@thp-canonical thp-canonical May 27, 2024

Choose a reason for hiding this comment

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

Yes, it'd allow us to be more flexible with the file name selection (e.g. could be a non-hidden file or a different filename extension, etc..).

@benhoyt benhoyt merged commit b45911a into canonical:master May 27, 2024
15 checks passed
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