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

WIP: CodiMD CLI config file #23

Closed
wants to merge 1 commit into from

Conversation

SISheogorath
Copy link
Collaborator

Since the CodiMD CLI relies on information like the remote server, it
would be useful to have this information provided in a config file. A
simple env file seems like an easy way to store data.

This patch implements a very basic functionality to have such a config
file.

Since the CodiMD CLI relies on information like the remote server, it 
would be useful to have this information provided in a config file. A 
simple env file seems like an easy way to store data.

This patch implements a very basic functionality to have such a config 
file.
@SISheogorath SISheogorath added the enhancement New feature or request label Apr 11, 2019
@Fumesover Fumesover mentioned this pull request Apr 11, 2019
Copy link
Member

@hugopeixoto hugopeixoto left a comment

Choose a reason for hiding this comment

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

This looks like a good start, can you rebase this / fix the conflicts and sign the DCO?

@@ -190,8 +194,19 @@ function delete_history() {
fi
}

function write_config() {
# Backup current config
cp "$CONFIG_FILE" "$CONFIG_FILE.bak"
Copy link
Member

Choose a reason for hiding this comment

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

Won't this fail if it's the first time writing the config? I think we need the [ -e ] check here.

I'd also add a warning message saying we generated the backup file if it is generated, so people can clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants