@alicloud/acc
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -48,4 +48,8 @@ 'use strict'; | ||
const config = await loadConfig(); | ||
if (!config) { | ||
console.log('No any profiles.'); | ||
} | ||
display(config); | ||
} | ||
}; |
@@ -212,2 +212,7 @@ 'use strict'; | ||
const config = await loadConfig(); | ||
if (!config) { | ||
console.error(`No any configurations.`); | ||
process.exit(1); | ||
} | ||
let profile; | ||
@@ -214,0 +219,0 @@ if (parsed.has('profile')) { |
@@ -9,2 +9,3 @@ 'use strict'; | ||
const readFileAsync = util.promisify(fs.readFile); | ||
const existsAsync = util.promisify(fs.exists); | ||
@@ -15,2 +16,7 @@ const CONFIG_FILE = path.join(os.homedir(), '.aliyun', 'config.json'); | ||
const configPath = process.env.ALIBABACLOUD_CONFIG || CONFIG_FILE; | ||
const exists = await existsAsync(configPath); | ||
if (!exists) { | ||
return null; | ||
} | ||
const configContent = await readFileAsync(configPath, 'utf-8'); | ||
@@ -17,0 +23,0 @@ return JSON.parse(configContent); |
{ | ||
"name": "@alicloud/acc", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Alibaba Cloud Credentials CLI", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33156
570