Skip to content

Commit

Permalink
[core] Fix numeric datasets being treated as missing
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Dec 13, 2017
1 parent 479b1ae commit 1e0969f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ export default {
description: 'Delete a dataset within your project',
action: async (args, context) => {
const {apiClient, prompt, output} = context
const [dataset] = args.argsWithoutOptions
if (!dataset) {
const [ds] = args.argsWithoutOptions
if (!ds) {
throw new Error('Dataset name must be provided')
}

const dataset = `${ds}`

await prompt.single({
type: 'input',
message: 'Are you ABSOLUTELY sure you want to delete this dataset?\n Type the name of the dataset to confirm delete:',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
const [targetDataset, targetDestination] = args.argsWithoutOptions
const {absolutify} = pathTools

let dataset = targetDataset
let dataset = targetDataset ? `${targetDataset}` : null
if (!dataset) {
dataset = await chooseDatasetPrompt(context, {message: 'Select dataset to export'})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
const datasets = await client.datasets.list()
spinner.succeed('[100%] Fetching available datasets')

let targetDataset = target
let targetDataset = target ? `${target}` : null
if (!targetDataset) {
targetDataset = await chooseDatasetPrompt(context, {
message: 'Select target dataset',
Expand Down

0 comments on commit 1e0969f

Please sign in to comment.