remix-run / history

Manage session history with JavaScript
MIT License
8.29k stars 961 forks source link

Fix: ensureCleanWorkingDirectory fails with only newly added files in the working directory #923

Open terrencekhng opened 2 years ago

terrencekhng commented 2 years ago

Description

I think it's a tiny bug. When there are only newly added files in the working directory, npm run version is not expected to fail in the ensureCleanWorkingDirectory step.

Before: wecom-temp-cc1d50caa77c8b190317111f84b1d999

After: wecom-temp-32f77ac83cd6bf5dc3b1c9fbaada29f3

Change

The trimmed output of git status --porcelain is an empty string if the working directory is clean for the next version number generation.