Skip to content

Commit 3f96de3

Browse files
committed
[data-push-flow][xs]: added separately datahubConfigs, so we can use it later in the code to get owner
1 parent f9d4fdf commit 3f96de3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

bin/data-push-flow.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,17 @@ Promise.resolve().then(async () => {
5353
const datasetPath = argv._[0] || process.cwd()
5454
dataset = await Dataset.load(datasetPath)
5555
stopSpinner = wait('Commencing push ...')
56-
57-
const datahub = new DataHub({
56+
57+
const datahubConfigs = {
5858
apiUrl: config.get('api'),
5959
token: config.get('token'),
6060
debug: argv.debug,
6161
ownerid: config.get('profile') ? config.get('profile').id : config.get('id'),
6262
owner: config.get('profile') ? config.get('profile').username : config.get('username')
63-
})
64-
63+
}
64+
const datahub = new DataHub(datahubConfigs)
6565
const res = await datahub.pushFlow(path.join(datasetPath ,'.datahub/flow.yaml'))
6666
let revisionId = res.flow_id.split('/').pop()
67-
6867
stopSpinner()
6968
const message = '🙌 your data is published!\n'
7069
const url = urljoin(config.get('domain'), datahubConfigs.owner, dataset.descriptor.name,'v',revisionId)

0 commit comments

Comments
 (0)