Remove duplicated message and add a missing one

This commit is contained in:
Matheus Fernandes 2016-11-22 09:48:17 -02:00
parent bf163bb668
commit d34765faa6
No known key found for this signature in database
GPG key ID: DD07CA4EA7B65C4F

View file

@ -201,11 +201,14 @@ export function moveTo(i) {
} }
export function showPreferences() { export function showPreferences() {
const isWin = process.platform === 'win32';
// eslint-disable-next-line no-template-curly-in-string // 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 command = isWin ? ' start notepad "%userprofile%\\.hyper.js"' : ' bash -c \'exec env ${EDITOR:=nano} ~/.hyper.js\'';
const message = process.platform === 'win32' ? const message = [];
message.push(isWin ?
' echo Attempting to open ^%userprofile^%\\.hyper.js with notepad' : ' 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 => { return dispatch => {
dispatch({ dispatch({
@ -217,9 +220,8 @@ export function showPreferences() {
rpc.once('session data', () => { rpc.once('session data', () => {
dispatch(sendSessionData( dispatch(sendSessionData(
uid, 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, command,
'' ''
].join('\n\r') ].join('\n\r')