mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 14:37:47 +00:00
Fix project directory validation for 'balena deploy' with pre-built image
Change-type: patch
This commit is contained in:
parent
ff319d67f3
commit
96e28f3d45
@ -198,7 +198,7 @@ module.exports =
|
|||||||
require('events').defaultMaxListeners = 1000
|
require('events').defaultMaxListeners = 1000
|
||||||
sdk = getBalenaSdk()
|
sdk = getBalenaSdk()
|
||||||
{ ExpectedError } = require('../errors')
|
{ ExpectedError } = require('../errors')
|
||||||
{ validateProjectDirectory } = require('../utils/compose_ts')
|
{ getRegistrySecrets, validateProjectDirectory } = require('../utils/compose_ts')
|
||||||
helpers = require('../utils/helpers')
|
helpers = require('../utils/helpers')
|
||||||
Logger = require('../utils/logger')
|
Logger = require('../utils/logger')
|
||||||
|
|
||||||
@ -225,16 +225,21 @@ module.exports =
|
|||||||
if image? and options.build
|
if image? and options.build
|
||||||
throw new ExpectedError('Build option is not applicable when specifying an image')
|
throw new ExpectedError('Build option is not applicable when specifying an image')
|
||||||
.then ->
|
.then ->
|
||||||
validateProjectDirectory(sdk, {
|
if image
|
||||||
dockerfilePath: options.dockerfile,
|
getRegistrySecrets(sdk, options['registry-secrets'])
|
||||||
noParentCheck: options['noparent-check'] || false,
|
.then (registrySecrets) ->
|
||||||
projectPath: options.source || '.',
|
options['registry-secrets'] = registrySecrets
|
||||||
registrySecretsPath: options['registry-secrets'],
|
else
|
||||||
})
|
validateProjectDirectory(sdk, {
|
||||||
.then ({ dockerfilePath, registrySecrets }) ->
|
dockerfilePath: options.dockerfile,
|
||||||
options.dockerfile = dockerfilePath
|
noParentCheck: options['noparent-check'] || false,
|
||||||
options['registry-secrets'] = registrySecrets
|
projectPath: options.source || '.',
|
||||||
|
registrySecretsPath: options['registry-secrets'],
|
||||||
|
})
|
||||||
|
.then ({ dockerfilePath, registrySecrets }) ->
|
||||||
|
options.dockerfile = dockerfilePath
|
||||||
|
options['registry-secrets'] = registrySecrets
|
||||||
|
.then ->
|
||||||
Promise.join(
|
Promise.join(
|
||||||
helpers.getApplication(appName)
|
helpers.getApplication(appName)
|
||||||
helpers.getArchAndDeviceType(appName)
|
helpers.getArchAndDeviceType(appName)
|
||||||
|
Loading…
Reference in New Issue
Block a user