Skip to content

Commit 78a49f5

Browse files
authored
Trim git stdout when getting current commit hash in docs (#5479)
1 parent 48f29e1 commit 78a49f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/dev/docs/pages/react-aria/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ To help kick-start your project, we offer a starter kit that includes example im
226226

227227
<ResourceCard
228228
type="Storybook"
229-
url={`../react-aria-starter.${process.env.GIT_HASH || spawnSync('git', ['rev-parse', '--short', 'HEAD']).stdout}.zip`}
229+
url={`../react-aria-starter.${process.env.GIT_HASH || spawnSync('git', ['rev-parse', '--short', 'HEAD']).stdout.toString().trim()}.zip`}
230230
style={{marginTop: 36}} />
231231

232232
## Hooks

scripts/buildWebsite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function build() {
3131
console.log(`Building into ${dir}...`);
3232

3333
// Generate a package.json containing just what we need to build the website
34-
let gitHash = spawnSync('git', ['rev-parse', '--short', 'HEAD']).stdout;
34+
let gitHash = spawnSync('git', ['rev-parse', '--short', 'HEAD']).stdout.toString().trim();
3535
let pkg = {
3636
name: 'rsp-website',
3737
version: '0.0.0',

0 commit comments

Comments
 (0)