@getnote/cli
Advanced tools
+1
-1
| { | ||
| "name": "@getnote/cli", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "CLI tool for Get笔记 — manage notes and knowledge bases from the terminal", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -46,2 +46,13 @@ #!/usr/bin/env node | ||
| // Skip download if binary already matches current version | ||
| if (fs.existsSync(binaryPath)) { | ||
| try { | ||
| const out = execSync(`"${binaryPath}" version 2>/dev/null || "${binaryPath}" --version 2>/dev/null`, { encoding: 'utf8' }).trim(); | ||
| if (out.includes(VERSION)) { | ||
| console.log(`getnote v${VERSION} already installed, skipping download.`); | ||
| return; | ||
| } | ||
| } catch (_) { /* binary exists but can't run (wrong arch etc.), re-download */ } | ||
| } | ||
| console.log(`Downloading getnote v${VERSION} for ${platform.platform}/${platform.arch}...`); | ||
@@ -48,0 +59,0 @@ console.log(`URL: ${url}`); |
19915
2.44%70
16.67%