Skip to content

Commit

Permalink
Fix creation of shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
sam701 committed Oct 17, 2019
1 parent 65b56d2 commit 195be13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "awscredx"
version = "0.5.2"
version = "0.5.3"
authors = ["Alexei Samokvalov <[email protected]>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fn write_shell_script(ctx: &JobContext) -> Result<JobReport, String> {

let title = format!("Create shell script '{}'",
ctx.styles.path.paint(ctx.shell_config_script.to_str().unwrap()));
if outdated_script() {
if !ctx.shell_config_script.exists() || outdated_script() {
let file = File::create(&ctx.shell_config_script)
.map_err(|e| format!("cannot create configuration file {}: {}", ctx.shell_config_script.display(), e))?;
util::set_permissions(&ctx.shell_config_script, 0o600);
Expand Down

0 comments on commit 195be13

Please sign in to comment.