mirror of https://github.com/laurent22/joplin.git
CLI: fixed crash when inputting command without closed quote
parent
fe909f659d
commit
9d984596cc
|
@ -519,22 +519,22 @@ class AppGui {
|
|||
return;
|
||||
}
|
||||
|
||||
let note = this.widget('noteList').currentItem;
|
||||
let folder = this.widget('folderList').currentItem;
|
||||
let args = splitCommandString(cmd);
|
||||
try {
|
||||
let note = this.widget('noteList').currentItem;
|
||||
let folder = this.widget('folderList').currentItem;
|
||||
let args = splitCommandString(cmd);
|
||||
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] == '$n') {
|
||||
args[i] = note ? note.id : '';
|
||||
} else if (args[i] == '$b') {
|
||||
args[i] = folder ? folder.id : '';
|
||||
} else if (args[i] == '$c') {
|
||||
const item = this.activeListItem();
|
||||
args[i] = item ? item.id : '';
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] == '$n') {
|
||||
args[i] = note ? note.id : '';
|
||||
} else if (args[i] == '$b') {
|
||||
args[i] = folder ? folder.id : '';
|
||||
} else if (args[i] == '$c') {
|
||||
const item = this.activeListItem();
|
||||
args[i] = item ? item.id : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await this.app().execCommand(args);
|
||||
} catch (error) {
|
||||
this.stdout(error.message);
|
||||
|
|
|
@ -659,6 +659,15 @@ msgid ""
|
|||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr ""
|
||||
|
|
|
@ -708,6 +708,15 @@ msgid ""
|
|||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr "No se puede acceder a %s"
|
||||
|
|
|
@ -715,6 +715,15 @@ msgstr ""
|
|||
"Impossible de rafraîchir la connexion à OneDrive. Démarrez la "
|
||||
"synchronisation à nouveau pour corriger le problème."
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr "Impossible d'accéder à %s"
|
||||
|
|
|
@ -659,6 +659,15 @@ msgid ""
|
|||
"synchronisation again may fix the problem."
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Could not synchronize with OneDrive.\n"
|
||||
"\n"
|
||||
"This error often happens when using OneDrive for Business, which "
|
||||
"unfortunately cannot be supported.\n"
|
||||
"\n"
|
||||
"Please consider using a regular OneDrive account."
|
||||
msgstr ""
|
||||
|
||||
#, javascript-format
|
||||
msgid "Cannot access %s"
|
||||
msgstr ""
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "joplin",
|
||||
"version": "0.10.74",
|
||||
"version": "0.10.75",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
"version": "0.10.74",
|
||||
"version": "0.10.75",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue