Skip to content

Commit

Permalink
Add gmsaas doctor to check authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascarpentier committed Oct 29, 2024
1 parent 719ead0 commit d85fb45
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions dist/setup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/setup/index.js.map

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,19 @@ async function installGmsaasCli(gmsaasVersion) {
* @param {string} gmsaasAPIToken Genymotion SaaS API Token
*/
async function login(gmsaasAPIToken) {
core.info('Login gmsaas...');
try {
core.info('Login gmsaas...');

await exec.exec(`gmsaas auth token ${gmsaasAPIToken}`);
} catch (error) {
core.setFailed(`Failed to login: ${error.message}`);
}

core.info('Checking gmsaas authentication');
try {
await exec.exec('gmsaas doctor --auth');
} catch (error) {
core.setFailed(`Failed to authenticate: ${error.message}`);
}
}

/**
Expand Down

0 comments on commit d85fb45

Please sign in to comment.