Skip to content

Commit

Permalink
fix(stash): message with space
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu committed Sep 22, 2020
1 parent b2987c4 commit ecefbe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-wiz",
"version": "1.2.1",
"version": "1.2.2",
"author": {
"email": "moshfeu.dev@gmail.com",
"name": "Mosh Feu",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function showFilesChooserAnd<
choices,
validate: (answer: string) => {
if (answer.length < 1) {
return 'Are you tricking me 🤨? Please choose files to add';
return 'Are you tricking me 🤨? Please choose files';
}
return true;
},
Expand Down
3 changes: 2 additions & 1 deletion src/utils/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export async function gitReset(files: Array<string>) {

export async function gitStash(files: Array<string>, message?: string) {
await gitAdd(files);
await runCommand(`stash push${message ? ` -m ${message}` : ''}`, files);
// sorry for the 'replace', the space conflicts with: https://github.com/spread-the-code/git-wiz/blob/134f7cb9053cc20edcb0b969848d39d836b0ce31/src/utils/exec.ts#L6
await runCommand(`stash push${message ? ` -m ${message.replace(/ /g, '-')}` : ''}`, files);
}

export function gitDiff(files: Array<string>, flags: Array<string>) {
Expand Down

0 comments on commit ecefbe1

Please sign in to comment.