Skip to content

Commit

Permalink
make deepsource happy even though the 'dependson' stuff would assert …
Browse files Browse the repository at this point in the history
…that those flags are there

Signed-off-by: Amndeep Singh Mann <[email protected]>
  • Loading branch information
Amndeep7 committed May 20, 2022
1 parent 97cd1ac commit 69b2831
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/commands/convert/ionchannel2hdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export default class IonChannel2HDF extends Command {
throw new Error('Please either provide a list of input files or set the api key and the team name.')
}

if (flags.allProjects) {
if (flags.apiKey && flags.teamName && flags.allProjects) {
logger.debug('Creating Ion Channel API Client')
const apiClient = new IonChannelAPIMapper(flags.apiKey!)
const apiClient = new IonChannelAPIMapper(flags.apiKey)
logger.debug(`Setting team to ${flags.teamName}`)
await apiClient.setTeam(flags.teamName!)
await apiClient.setTeam(flags.teamName)
logger.debug(`Set team to ID ${apiClient.teamId}`)

fs.mkdirSync(flags.output)
Expand All @@ -90,11 +90,11 @@ export default class IonChannel2HDF extends Command {

fs.writeFileSync(path.join(flags.output, filename), JSON.stringify(json))
}
} else if (Array.isArray(flags.project)) {
} else if (flags.apiKey && flags.teamName && Array.isArray(flags.project)) {
logger.debug('Creating Ion Channel API Client')
const apiClient = new IonChannelAPIMapper(flags.apiKey!)
const apiClient = new IonChannelAPIMapper(flags.apiKey)
logger.debug(`Setting team to ${flags.teamName}`)
await apiClient.setTeam(flags.teamName!)
await apiClient.setTeam(flags.teamName)
logger.debug(`Set team to ID ${apiClient.teamId}`)

fs.mkdirSync(flags.output)
Expand Down

0 comments on commit 69b2831

Please sign in to comment.