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:
ezl-keygraph
2026-03-19 01:21:45 +05:30
parent 35b5192837
commit 45581a7882
5 changed files with 1 additions and 34 deletions
-10
View File
@@ -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.');
}
-16
View File
@@ -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.
*/
-5
View File
@@ -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.');