mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
Remove duplicated message and add a missing one
This commit is contained in:
parent
bf163bb668
commit
d34765faa6
1 changed files with 8 additions and 6 deletions
|
|
@ -201,11 +201,14 @@ export function moveTo(i) {
|
|||
}
|
||||
|
||||
export function showPreferences() {
|
||||
const isWin = process.platform === 'win32';
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
const command = process.platform === 'win32' ? ' start notepad "%userprofile%\\.hyper.js"' : ' bash -c \'exec env ${EDITOR:=nano} ~/.hyper.js\'';
|
||||
const message = process.platform === 'win32' ?
|
||||
const command = isWin ? ' start notepad "%userprofile%\\.hyper.js"' : ' bash -c \'exec env ${EDITOR:=nano} ~/.hyper.js\'';
|
||||
const message = [];
|
||||
message.push(isWin ?
|
||||
' echo Attempting to open ^%userprofile^%\\.hyper.js with notepad' :
|
||||
' echo Attempting to open ~/.hyper.js with your \\$EDITOR';
|
||||
' echo Attempting to open ~/.hyper.js with your \\$EDITOR');
|
||||
message.push(' echo If it fails, open it manually with your favorite editor!');
|
||||
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
|
|
@ -217,9 +220,8 @@ export function showPreferences() {
|
|||
rpc.once('session data', () => {
|
||||
dispatch(sendSessionData(
|
||||
uid,
|
||||
[ // Leading space prevents command to be stored in shell history
|
||||
' echo Attempting to open ~/.hyper.js with your \$EDITOR', // eslint-disable-line no-useless-escape
|
||||
message,
|
||||
[
|
||||
...message,
|
||||
command,
|
||||
''
|
||||
].join('\n\r')
|
||||
|
|
|
|||
Loading…
Reference in a new issue