diff --git a/bin/cml/runner.js b/bin/cml/runner.js index aeb78e6ad..3e9aaceae 100755 --- a/bin/cml/runner.js +++ b/bin/cml/runner.js @@ -94,7 +94,7 @@ const shutdown = async (opts) => { }; if (error) winston.error(error); - winston.info( + console.log( JSON.stringify({ level: error ? 'error' : 'info', status: 'terminated', @@ -451,7 +451,8 @@ exports.builder = (yargs) => 'repo', 'Repository to be used for registering the runner. If not specified, it will be inferred from the environment' ) - .default('token', REPO_TOKEN) + .default('token', 'infer') + .coerce('token', (val) => (val === 'infer' ? REPO_TOKEN : val)) .describe( 'token', 'Personal access token to register a self-hosted runner on the repository. If not specified, it will be inferred from the environment' diff --git a/bin/cml/runner.test.js b/bin/cml/runner.test.js index bc59659ce..c63266d22 100644 --- a/bin/cml/runner.test.js +++ b/bin/cml/runner.test.js @@ -38,6 +38,7 @@ Options: --token Personal access token to register a self-hosted runner on the repository. If not specified, it will be inferred from the environment + [default: \\"infer\\"] --cloud Cloud to deploy the runner [choices: \\"aws\\", \\"azure\\", \\"gcp\\", \\"kubernetes\\"] --cloud-region Region where the instance is deployed. Choices: