Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Commit d57472b

Browse files
raevilmanCopilot
andcommitted
Fix: retain quotes on commit message argument
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3099e40 commit d57472b

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ async function main() {
134134
}
135135

136136
try {
137-
const gitCommand = `git commit --date="${formattedDate}" ${gitArgs.join(' ')}`;
137+
const quotedArgs = gitArgs.map(arg => arg.includes(' ') ? `"${arg}"` : arg);
138+
const gitCommand = `git commit --date="${formattedDate}" ${quotedArgs.join(' ')}`;
138139
console.log(`Running: ${gitCommand}`);
139140
execSync(gitCommand, { stdio: 'inherit' });
140141
console.log('Commit successful!');

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "future_commit",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Use future date while making git commits",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)