mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-11 17:44:19 -05:00
fix default creds path
This commit is contained in:
@@ -89,5 +89,5 @@ aws-sdk-ec2 = "1.40.0"
|
||||
|
||||
# MISC
|
||||
derive_builder = "0.20.0"
|
||||
colored = "2.1.0"
|
||||
typeshare = "1.0.3"
|
||||
colored = "2.1.0"
|
||||
|
||||
@@ -173,7 +173,7 @@ local = "/home/ubuntu/.config/monitor/dev.core.config.toml"
|
||||
container = "/config/config.toml"
|
||||
|
||||
[[deployment.config.volumes]]
|
||||
local = "/etc/monitor/repos/monitor-dev-frontend/frontend/dist"
|
||||
local = "/data/repos/monitor-dev-frontend/frontend/dist"
|
||||
container = "/frontend"
|
||||
|
||||
[[deployment.config.labels]]
|
||||
|
||||
@@ -25,20 +25,26 @@ struct CliArgs {
|
||||
#[command(subcommand)]
|
||||
command: Command,
|
||||
/// The path to a creds file.
|
||||
#[arg(long, default_value_t = String::from("./creds.toml"))]
|
||||
#[arg(long, default_value_t = default_creds())]
|
||||
creds: String,
|
||||
/// Log less (just resource names).
|
||||
#[arg(long, default_value_t = false)]
|
||||
quiet: bool,
|
||||
}
|
||||
|
||||
fn default_creds() -> String {
|
||||
let home = std::env::var("HOME")
|
||||
.expect("no HOME env var. cannot get default config path.");
|
||||
format!("{home}/.config/monitor/creds.toml")
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Subcommand)]
|
||||
enum Command {
|
||||
/// Runs syncs on resource files
|
||||
Sync {
|
||||
/// The path of the resource folder / file
|
||||
/// Folder paths will recursively incorporate all the resources it finds under the folder
|
||||
#[arg(default_value_t = default_path())]
|
||||
#[arg(default_value_t = String::from("./resources"))]
|
||||
path: String,
|
||||
},
|
||||
|
||||
@@ -49,12 +55,6 @@ enum Command {
|
||||
},
|
||||
}
|
||||
|
||||
fn default_path() -> String {
|
||||
let home = std::env::var("HOME")
|
||||
.expect("no HOME env var. cannot get default config path.");
|
||||
format!("{home}/.config/monitor/creds.toml")
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct CredsFile {
|
||||
url: String,
|
||||
|
||||
@@ -15,8 +15,8 @@ cmd = "yarn dev"
|
||||
path = "frontend"
|
||||
cmd = "yarn build"
|
||||
|
||||
[monrun-sync]
|
||||
path = "bin/monrun"
|
||||
[monitor-sync]
|
||||
path = "bin/cli"
|
||||
cmd = "cargo run -- sync"
|
||||
|
||||
[doc-dev-server]
|
||||
|
||||
Reference in New Issue
Block a user