Browse Source

Log note about restarts for environment changes

default_compile_flags
vector-of-bool 3 years ago
parent
commit
33d8eb564b
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/dds/cli/cmd/install_yourself.cpp

+ 8
- 2
src/dds/cli/cmd/install_yourself.cpp View File

// Let's add it // Let's add it
profile_content profile_content
+= ("\n# This entry was added by 'dds install-yourself' for the user-local " += ("\n# This entry was added by 'dds install-yourself' for the user-local "
"binaries\nPATH=$HOME/bin:$HOME/.local/bin:$PATH\n");
"binaries path\nPATH=$HOME/bin:$HOME/.local/bin:$PATH\n");
if (opts.dry_run) { if (opts.dry_run) {
dds_log(info, dds_log(info,
"Would update [.br.cyan[{}]] to have ~/.local/bin on $PATH"_styled, "Would update [.br.cyan[{}]] to have ~/.local/bin on $PATH"_styled,
"[.br.green[{}]] was updated. Prior contents are safe in [.br.cyan[{}]]"_styled, "[.br.green[{}]] was updated. Prior contents are safe in [.br.cyan[{}]]"_styled,
profile_file.string(), profile_file.string(),
bak_file.string()); bak_file.string());
dds_log(
info,
".bold.cyan[NOTE:] Running applications may need to be restarted to see this change"_styled);
} }
} }


"Updating Fish shell configuration [.br.cyan[{}]] with user-local binaries PATH entry"_styled, "Updating Fish shell configuration [.br.cyan[{}]] with user-local binaries PATH entry"_styled,
fish_config.string()); fish_config.string());
fish_config_content fish_config_content
+= ("\n# This line was added by 'dds install-yourself' to add the usre-local "
+= ("\n# This line was added by 'dds install-yourself' to add the user-local "
"binaries directory to $PATH\nset -x PATH $PATH \"$HOME/.local/bin\"\n"); "binaries directory to $PATH\nset -x PATH $PATH \"$HOME/.local/bin\"\n");
auto tmp_file = fish_config; auto tmp_file = fish_config;
auto bak_file = fish_config; auto bak_file = fish_config;
"[.br.green[{}]] was updated. Prior contents are safe in [.br.cyan[{}]]"_styled, "[.br.green[{}]] was updated. Prior contents are safe in [.br.cyan[{}]]"_styled,
fish_config.string(), fish_config.string(),
bak_file.string()); bak_file.string());
dds_log(
info,
".bold.cyan[NOTE:] Running Fish shells will need to be restartred to see this change"_styled);
} }
} }
#else // _WIN32 #else // _WIN32

Loading…
Cancel
Save