Skip to content

Commit

Permalink
lint mdctl-cli package
Browse files Browse the repository at this point in the history
  • Loading branch information
Ala Hawash committed Feb 16, 2024
1 parent 7f38725 commit 0ae6421
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/mdctl-cli/lib/env/export.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-len */
const { Transform } = require('stream')

const fs = require('fs'),
Expand Down
2 changes: 1 addition & 1 deletion packages/mdctl-cli/lib/studyQuestions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { prompt } = require('inquirer'),
_ = require('lodash')
_ = require('lodash'),

askSelectTasks = async(inputArgs) => {
// eslint-disable-next-line no-underscore-dangle
Expand Down
8 changes: 6 additions & 2 deletions packages/mdctl-cli/tasks/study.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable one-var */
/* eslint-disable class-methods-use-this */

const _ = require('lodash'),
Expand Down Expand Up @@ -162,13 +163,14 @@ class Study extends Task {


}

async 'study@workflows'(cli) {
const client = await cli.getApiClient({ credentials: await cli.getAuthOptions() }),
params = await cli.getArguments(this.optionKeys),
studyTools = new StudyManifestTools(client, params),
action = this.args('2')
if (!(await studyTools.isWorkflowSupported())) {
throw Fault.create('kInvalidArgument', {reason: 'Target environment has not installed Workflow Package, please install Workflow Package and try again'})
throw Fault.create('kInvalidArgument', { reason: 'Target environment has not installed Workflow Package, please install Workflow Package and try again' })
}

if (!action) {
Expand All @@ -181,7 +183,9 @@ class Study extends Task {
throw workflows[0]
}
const selectedWorkflows = await askSelectWorkflows({ workflows })
if (!selectedWorkflows.length) throw Fault.create('kInvalidArgument', { reason: 'No Workflows selected' })
if (!selectedWorkflows.length) {
throw Fault.create('kInvalidArgument', { reason: 'No Workflows selected' })
}
const { manifest } = await studyTools.getWorkflowsManifest(selectedWorkflows)


Expand Down

0 comments on commit 0ae6421

Please sign in to comment.