Skip to content

Commit

Permalink
Merge pull request #30 from tsirysndr/feat/envhub-init-messages
Browse files Browse the repository at this point in the history
feat: add success messages after `envhub init`
  • Loading branch information
tsirysndr authored Feb 18, 2024
2 parents e13d296 + 5b1cbf8 commit 3e4bbfb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ You can use EnvHub as a [GitHub Action](https://github.com/tsirysndr/setup-envhu
```yaml
- uses: tsirysndr/setup-envhub@v1
with:
version: 'v0.2.6'
version: 'v0.2.7'
- run: envhub --help
```
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
name = "envhub"
readme = "../../README.md"
repository = "https://github.com/tsirysndr/envhub"
version = "0.2.6"
version = "0.2.7"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
17 changes: 17 additions & 0 deletions crates/cli/src/cmd/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{

use anyhow::Error;
use envhub_types::configuration::ConfigFormat;
use owo_colors::OwoColorize;

use crate::config::{generate_config, generate_default_config};

Expand All @@ -20,8 +21,24 @@ pub fn execute_init(
let mut file = File::create("dotfiles/.zshrc")?;
file.write_all(b"# This is an example of .zshrc file\n")?;
generate_default_config(&cfg_format)?;
println!(
"{} Successfully initialized a new environment ✨",
"[✓]".bright_green()
);
println!(
"Run {} to apply the changes to your environment",
"`envhub use`".bright_green()
);
return Ok(());
}
generate_config(&cfg_format, packages, envs, package_manager, use_stow)?;
println!(
"{} Successfully initialized a new environment ✨",
"[✓]".bright_green()
);
println!(
"Run {} to apply the changes to your environment",
"`envhub use`".bright_green()
);
Ok(())
}
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
inherit src;

pname = "envhub";
version = "0.2.5";
version = "0.2.7";
cargoExtraArgs = "--package=envhub";

buildInputs = [
Expand Down

0 comments on commit 3e4bbfb

Please sign in to comment.