Skip to content

Commit ecefbe1

Browse files
committed
fix(stash): message with space
1 parent b2987c4 commit ecefbe1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-wiz",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"author": {
55
"email": "moshfeu.dev@gmail.com",
66
"name": "Mosh Feu",

src/utils/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function showFilesChooserAnd<
2828
choices,
2929
validate: (answer: string) => {
3030
if (answer.length < 1) {
31-
return 'Are you tricking me 🤨? Please choose files to add';
31+
return 'Are you tricking me 🤨? Please choose files';
3232
}
3333
return true;
3434
},

src/utils/git.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export async function gitReset(files: Array<string>) {
7171

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

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

0 commit comments

Comments
 (0)