1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

CLI: fixed crash when inputting command without closed quote

This commit is contained in:
Laurent Cozic 2017-12-01 17:51:27 +00:00
parent fe909f659d
commit 9d984596cc
13 changed files with 57 additions and 21 deletions

View File

@ -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);

View File

@ -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 ""

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -1,6 +1,6 @@
{
"name": "joplin",
"version": "0.10.74",
"version": "0.10.75",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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