Skip to content

Commit

Permalink
Fix vip app
Browse files Browse the repository at this point in the history
Restore support for format for the command, otherwise we never end up
outputting anything. Also removes the redundant `header` handling which
would include extrenuous data in the output.
  • Loading branch information
mjangda committed Dec 9, 2024
1 parent 0a24901 commit d27db5f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/bin/vip-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import app from '../lib/api/app';
import command, { getEnvIdentifier } from '../lib/cli/command';
import { trackEvent } from '../lib/tracker';

command( { requiredArgs: 1 } )
command( { requiredArgs: 1, format: true } )
.example(
'vip app list',
'Retrieve a list of applications that can be accessed by the current authenticated VIP-CLI user.'
Expand Down Expand Up @@ -59,12 +59,6 @@ command( { requiredArgs: 1 } )
// Clone the read-only response object so we can modify it
const clonedResponse = Object.assign( {}, res );

const header = [
{ key: 'id', value: res.id },
{ key: 'name', value: res.name },
{ key: 'repo', value: res.repo },
];

clonedResponse.environments = clonedResponse.environments.map( env => {
const clonedEnv = Object.assign( {}, env );

Expand All @@ -87,5 +81,5 @@ command( { requiredArgs: 1 } )
return clonedEnv;
} );

return { header, data: clonedResponse.environments };
return clonedResponse.environments;
} );

0 comments on commit d27db5f

Please sign in to comment.