mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-29 15:44:26 +00:00
Fix issue with replaced command checks
Change-type: patch Resolves: #2022 Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
parent
bdcf58471f
commit
504877c232
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { stripIndent } from './utils/lazy';
|
||||
import { ExpectedError } from './errors';
|
||||
import { exitWithExpectedError } from './errors';
|
||||
|
||||
export interface AppOptions {
|
||||
// Prevent the default behavior of flushing stdout after running a command
|
||||
@ -101,7 +101,7 @@ export function checkDeletedCommand(argvSlice: string[]): void {
|
||||
version: string,
|
||||
verb = 'replaced',
|
||||
) {
|
||||
throw new ExpectedError(stripIndent`
|
||||
exitWithExpectedError(stripIndent`
|
||||
Note: the command "balena ${oldCmd}" was ${verb} in CLI version ${version}.
|
||||
Please use "balena ${alternative}" instead.
|
||||
`);
|
||||
@ -111,7 +111,7 @@ export function checkDeletedCommand(argvSlice: string[]): void {
|
||||
if (alternative) {
|
||||
msg = [msg, alternative].join('\n');
|
||||
}
|
||||
throw new ExpectedError(msg);
|
||||
exitWithExpectedError(msg);
|
||||
}
|
||||
const stopAlternative =
|
||||
'Please use "balena ssh -s" to access the host OS, then use `balena-engine stop`.';
|
||||
|
Loading…
x
Reference in New Issue
Block a user