mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-20 22:23:07 +00:00
Deprecate envs
command in favor of env list
Change-type: patch
This commit is contained in:
parent
e8ed309094
commit
cdec4a6847
@ -2188,7 +2188,7 @@ port mapping in the format <remotePort>[:[localIP:]localPort]
|
||||
|
||||
### Aliases
|
||||
|
||||
- `envs`
|
||||
- `envs` *(deprecated)*
|
||||
|
||||
|
||||
To use one of the aliases, replace `env list` with the alias.
|
||||
|
1
src/commands/env/list.ts
vendored
1
src/commands/env/list.ts
vendored
@ -47,6 +47,7 @@ interface ServiceEnvironmentVariableInfo
|
||||
|
||||
export default class EnvListCmd extends Command {
|
||||
public static aliases = ['envs'];
|
||||
public static deprecateAliases = true;
|
||||
|
||||
public static description = stripIndent`
|
||||
List the environment or config variables of a fleet, device or service.
|
||||
|
9
tests/commands/env/list.spec.ts
vendored
9
tests/commands/env/list.spec.ts
vendored
@ -65,20 +65,17 @@ describe('balena env list', function () {
|
||||
api.expectGetAppEnvVars();
|
||||
api.expectGetAppServiceVars();
|
||||
|
||||
const { out, err } = await runCommand(`envs -f ${appName}`);
|
||||
const { out } = await runCommand(`envs -f ${appName}`);
|
||||
|
||||
expect(out.join('')).to.satisfy((msg: string) =>
|
||||
msg.endsWith(
|
||||
stripIndent`
|
||||
expect(out.join('')).to.contain(
|
||||
stripIndent`
|
||||
ID NAME VALUE FLEET SERVICE
|
||||
120110 svar1 svar1-value gh_user/testApp service1
|
||||
120111 svar2 svar2-value gh_user/testApp service2
|
||||
120101 var1 var1-val gh_user/testApp *
|
||||
120102 var2 22 gh_user/testApp *
|
||||
` + '\n',
|
||||
),
|
||||
);
|
||||
expect(err.join('')).to.equal('');
|
||||
});
|
||||
|
||||
it('should successfully list config vars for a test fleet', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user