mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-31 08:25:36 +00:00
Merge pull request #1194 from balena-io/1187-numeric-app-name
Handle app names that look like a number (e.g. 1234)
This commit is contained in:
commit
88ad591a83
@ -190,10 +190,12 @@ module.exports =
|
|||||||
|
|
||||||
appName = undefined
|
appName = undefined
|
||||||
Promise.try ->
|
Promise.try ->
|
||||||
{ appName, image } = params
|
# when Capitano converts a positional parameter (but not an option)
|
||||||
|
# to a number, the original value is preserved with the _raw suffix
|
||||||
|
{ appName, appName_raw, image } = params
|
||||||
|
|
||||||
# look into "balena build" options if appName isn't given
|
# look into "balena build" options if appName isn't given
|
||||||
appName = options.application if not appName?
|
appName = appName_raw || appName || options.application
|
||||||
delete options.application
|
delete options.application
|
||||||
|
|
||||||
validateComposeOptions(options)
|
validateComposeOptions(options)
|
||||||
|
@ -99,7 +99,10 @@ async function getAppOwner(sdk: BalenaSDK, appName: string) {
|
|||||||
|
|
||||||
export const push: CommandDefinition<
|
export const push: CommandDefinition<
|
||||||
{
|
{
|
||||||
|
// when Capitano converts a positional parameter (but not an option)
|
||||||
|
// to a number, the original value is preserved with the _raw suffix
|
||||||
applicationOrDevice: string;
|
applicationOrDevice: string;
|
||||||
|
applicationOrDevice_raw: string;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: string;
|
source: string;
|
||||||
@ -235,7 +238,8 @@ export const push: CommandDefinition<
|
|||||||
);
|
);
|
||||||
const { BuildError } = await import('../utils/device/errors');
|
const { BuildError } = await import('../utils/device/errors');
|
||||||
|
|
||||||
const appOrDevice: string | null = params.applicationOrDevice;
|
const appOrDevice: string | null =
|
||||||
|
params.applicationOrDevice_raw || params.applicationOrDevice;
|
||||||
if (appOrDevice == null) {
|
if (appOrDevice == null) {
|
||||||
exitWithExpectedError('You must specify an application or a device');
|
exitWithExpectedError('You must specify an application or a device');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user