Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 90bcb79

Browse files
authored
fix: make cortex-nightly update -v works again (#1645)
1 parent 1bb23ca commit 90bcb79

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

engine/cli/commands/cortex_upd_cmd.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ std::unique_ptr<system_info_utils::SystemInfo> GetSystemInfoWithUniversal() {
4242
std::string GetNightlyInstallerName(const std::string& v,
4343
const std::string& os_arch) {
4444
const std::string kCortex = "cortex";
45-
std::string version = v == "latest" ? "" : (v + "-");
45+
// Remove 'v' in file name
46+
std::string version = v == "latest" ? "" : (v.substr(1) + "-");
4647
#if defined(__APPLE__) && defined(__MACH__)
4748
return kCortex + "-" + version + os_arch + "-network-installer.pkg";
4849
#elif defined(__linux__)
@@ -55,7 +56,8 @@ std::string GetNightlyInstallerName(const std::string& v,
5556
// C:\Users\vansa\AppData\Local\Temp\cortex\cortex-windows-amd64-network-installer.exe
5657
std::string GetInstallCmd(const std::string& exe_path) {
5758
#if defined(__APPLE__) && defined(__MACH__)
58-
return "sudo touch /var/tmp/cortex_installer_skip_postinstall && sudo installer "
59+
return "sudo touch /var/tmp/cortex_installer_skip_postinstall && sudo "
60+
"installer "
5961
"-pkg " +
6062
exe_path +
6163
" -target / && sudo rm /var/tmp/cortex_installer_skip_postinstall";

0 commit comments

Comments
 (0)