Browse Source

Updates clipboard error message for better clarity

main
Eric Amodio 6 years ago
parent
commit
c7e162fdbc
3 changed files with 5 additions and 5 deletions
  1. +1
    -1
      src/commands/copyMessageToClipboard.ts
  2. +3
    -3
      src/commands/copyShaToClipboard.ts
  3. +1
    -1
      src/git/remotes/provider.ts

+ 1
- 1
src/commands/copyMessageToClipboard.ts View File

@ -88,7 +88,7 @@ export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
catch (ex) { catch (ex) {
if (ex.message.includes("Couldn't find the required `xsel` binary")) { if (ex.message.includes("Couldn't find the required `xsel` binary")) {
window.showErrorMessage( window.showErrorMessage(
`Unable to copy message, xsel is not installed. You can install it via \`sudo apt install xsel\``
`Unable to copy message, xsel is not installed. Please install it via your package manager, e.g. \`sudo apt install xsel\``
); );
return; return;
} }

+ 3
- 3
src/commands/copyShaToClipboard.ts View File

@ -59,7 +59,7 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
} }
catch (ex) { catch (ex) {
Logger.error(ex, 'CopyShaToClipboardCommand', `getBlameForLine(${blameline})`); Logger.error(ex, 'CopyShaToClipboardCommand', `getBlameForLine(${blameline})`);
return Messages.showGenericErrorMessage('Unable to copy ommit id');
return Messages.showGenericErrorMessage('Unable to copy commit id');
} }
} }
@ -69,13 +69,13 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
catch (ex) { catch (ex) {
if (ex.message.includes("Couldn't find the required `xsel` binary")) { if (ex.message.includes("Couldn't find the required `xsel` binary")) {
window.showErrorMessage( window.showErrorMessage(
`Unable to copy commit id, xsel is not installed. You can install it via \`sudo apt install xsel\``
`Unable to copy commit id, xsel is not installed. Please install it via your package manager, e.g. \`sudo apt install xsel\``
); );
return; return;
} }
Logger.error(ex, 'CopyShaToClipboardCommand'); Logger.error(ex, 'CopyShaToClipboardCommand');
return Messages.showGenericErrorMessage('Unable to copy ommit id');
return Messages.showGenericErrorMessage('Unable to copy commit id');
} }
} }
} }

+ 1
- 1
src/git/remotes/provider.ts View File

@ -127,7 +127,7 @@ export abstract class RemoteProvider {
catch (ex) { catch (ex) {
if (ex.message.includes("Couldn't find the required `xsel` binary")) { if (ex.message.includes("Couldn't find the required `xsel` binary")) {
window.showErrorMessage( window.showErrorMessage(
`Unable to copy remote url, xsel is not installed. You can install it via \`sudo apt install xsel\``
`Unable to copy remote url, xsel is not installed. Please install it via your package manager, e.g. \`sudo apt install xsel\``
); );
return; return;
} }

Loading…
Cancel
Save