mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-07-09 14:48:33 +02:00
fix: remove redundant update command
Image is already auto-pulled by `ensureImage()` during `start` when the pinned version tag is missing locally. Manual `update` was unnecessary.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* `shannon update` command — pull the worker image matching the current CLI version.
|
||||
*/
|
||||
|
||||
import { pullImage } from '../docker.js';
|
||||
|
||||
export function update(version: string): void {
|
||||
pullImage(version);
|
||||
console.log('Update complete.');
|
||||
}
|
||||
@@ -292,22 +292,6 @@ export function stopInfra(clean: boolean): void {
|
||||
execFileSync('docker', args, { stdio: 'inherit' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull the worker image matching the current CLI version.
|
||||
*/
|
||||
export function pullImage(version: string): void {
|
||||
const image = getWorkerImage(version);
|
||||
console.log(`Pulling ${image}...`);
|
||||
try {
|
||||
execFileSync('docker', ['pull', image], { stdio: 'inherit' });
|
||||
} catch {
|
||||
console.error(`\nERROR: Failed to pull ${image}`);
|
||||
console.error('Check https://hub.docker.com/r/keygraph/shannon for available tags.');
|
||||
process.exit(1);
|
||||
}
|
||||
pruneOldImages(version);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove old keygraph/shannon images that don't match the current version.
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,6 @@ import { start } from './commands/start.js';
|
||||
import { status } from './commands/status.js';
|
||||
import { stop } from './commands/stop.js';
|
||||
import { uninstall } from './commands/uninstall.js';
|
||||
import { update } from './commands/update.js';
|
||||
import { workspaces } from './commands/workspaces.js';
|
||||
import { getMode } from './mode.js';
|
||||
import { displaySplash } from './splash.js';
|
||||
@@ -58,7 +57,6 @@ Usage:${
|
||||
? `
|
||||
${prefix} build [--no-cache] Build worker image`
|
||||
: `
|
||||
${prefix} update Pull latest image
|
||||
${prefix} uninstall Remove ~/.shannon/ and all data`
|
||||
}
|
||||
${prefix} info Show splash screen
|
||||
@@ -218,9 +216,6 @@ switch (command) {
|
||||
case 'build':
|
||||
build(args.includes('--no-cache'));
|
||||
break;
|
||||
case 'update':
|
||||
update(getVersion());
|
||||
break;
|
||||
case 'uninstall':
|
||||
if (getMode() === 'local') {
|
||||
console.error('ERROR: uninstall is only available in npx mode.');
|
||||
|
||||
Reference in New Issue
Block a user