1
0
mirror of https://github.com/jht5945/buildj.git synced 2025-12-29 18:30:05 +08:00
This commit is contained in:
2019-08-21 01:05:26 +08:00
parent d113263325
commit a56f1fc635

View File

@@ -153,11 +153,13 @@ pub fn get_tool_package_secret() -> XResult<String> {
let standard_config_object = json::parse(&standard_config_json)?; let standard_config_object = json::parse(&standard_config_json)?;
let build_js_auth_token = &standard_config_object["build.js"]["auth_token"]; let build_js_auth_token = &standard_config_object["build.js"]["auth_token"];
if build_js_auth_token.is_null() { if build_js_auth_token.is_null() {
return Err(new_box_error("Standard json#build.js#auth_token is null.")); Err(new_box_error("Standard json#build.js#auth_token is null."))
} } else {
Ok(build_js_auth_token.to_string()) Ok(build_js_auth_token.to_string())
} }
}
pub fn set_tool_package_secret(secret: &str) -> XResult<()> { pub fn set_tool_package_secret(secret: &str) -> XResult<()> {
let standard_config_file = get_user_home_dir(STANDARD_CONFIG_JSON)?; let standard_config_file = get_user_home_dir(STANDARD_CONFIG_JSON)?;