open-notepad 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/note.js +6 -1
  2. package/package.json +1 -1
package/bin/note.js CHANGED
@@ -490,7 +490,12 @@ async function handleEdit(codeArg) {
490
490
  await fs.writeFile(tempFilePath, initialContent, 'utf-8');
491
491
 
492
492
  // Open editor
493
- const editor = process.env.EDITOR || (process.platform === 'win32' ? 'notepad' : 'nano');
493
+ let editor = process.env.EDITOR;
494
+ if (process.platform === 'linux') {
495
+ editor = 'nano';
496
+ } else if (!editor) {
497
+ editor = process.platform === 'win32' ? 'notepad' : 'nano';
498
+ }
494
499
  info(`Opening editor: ${colors.bold}${editor}${colors.reset} with note content...`);
495
500
 
496
501
  const child = spawn(editor, [tempFilePath], { stdio: 'inherit', shell: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-notepad",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CLI tool for notepad.web.id to access, edit, create, and list room notes interactively.",
5
5
  "type": "module",
6
6
  "bin": {