Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
mac fixes + remove debugging code (#177)
Browse files Browse the repository at this point in the history
* mac fixes + remove debugging code

Signed-off-by: stevelr <dev@somecool.net>

* rustfmt

Signed-off-by: stevelr <steve@cosmonic.com>

* bump to crate 0.6.4; update dependencies

Signed-off-by: stevelr <steve@cosmonic.com>

Co-authored-by: stevelr <dev@somecool.net>
Co-authored-by: stevelr <steve@cosmonic.com>
  • Loading branch information
3 people authored Sep 24, 2021
1 parent 96b3028 commit d9e2209
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 41 deletions.
58 changes: 29 additions & 29 deletions 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 = "wash-cli"
version = "0.6.3"
version = "0.6.4"
authors = ["wasmCloud Team"]
edition = "2018"
repository = "https://github.com/wasmcloud/wash"
Expand Down
5 changes: 3 additions & 2 deletions src/generate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,15 @@ pub(crate) fn make_project(
let (template_base_dir, template_folder, _branch) = prepare_local_template(&args)?;

// read configuration file `project-generate.toml` from template.
let project_config_path =
let project_config_path = fs::canonicalize(
locate_project_config_file(CONFIG_FILE_NAME, &template_base_dir, &args.subfolder)
.with_context(|| {
format!(
"Invalid template folder: Required configuration file `{}` is missing.",
CONFIG_FILE_NAME
)
})?;
})?,
)?;
let mut config = Config::from_path(&project_config_path)?;
// prevent copying config file to project dir by adding it to the exclude list
config.exclude(
Expand Down
8 changes: 0 additions & 8 deletions src/generate/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ impl Matcher {
.iter()
.find(|rc| rc.from == rel_path)
.map(|rc| rc.to.as_str());
match ren {
None => {
println!("DBG: ren: {}: no", &rel_path.display());
}
Some(p) => {
println!("DBG: ren: {}: {}", &rel_path.display(), p);
}
}
ren
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_drain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fn set_smithy_cache_dir() -> (PathBuf, String) {
let tmp_dir = test_dir_with_subfolder("drain_smithy");
std::env::set_var("HOME", &format!("{}", &tmp_dir.display()));
let smithy_cache = format!("{}/Library/Caches/smithy", &tmp_dir.display());
create_dir_all(&PathBuf::from(&smithy_cache)).unwrap;
create_dir_all(&PathBuf::from(&smithy_cache)).unwrap();
// write a dummy file inside the smithy cache folder
std::fs::write(&path_to_test_file(&smithy_cache), b"junk").unwrap();
(tmp_dir, smithy_cache)
Expand Down

0 comments on commit d9e2209

Please sign in to comment.