Skip to content

Commit

Permalink
Merge branch 'main' into refactor/issue-1350
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Apr 19, 2024
2 parents 2acc9b7 + e545004 commit f7134e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/nx/src/executors/create-changeset/executor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import prompts from 'prompts'
import { readFile, rm, writeFile } from 'fs/promises'
import { join } from 'path'
import path, { join } from 'path'
import { promisify } from 'util'
import { exec } from 'child_process'
import { CreateChangesetExecutorSchema } from './schema'
Expand Down Expand Up @@ -94,7 +94,8 @@ export default async function runExecutor(options: CreateChangesetExecutorSchema

// create new changeset file
const { stdout } = await promisify(exec)(`npx changeset add --empty`)
const start = stdout.lastIndexOf('.changeset/') + '.changeset/'.length
const triggerWord = '.changeset' + path.sep
const start = stdout.lastIndexOf(triggerWord) + triggerWord.length
const end = stdout.lastIndexOf('.md') + '.md'.length
const filename = stdout.substring(start, end).trim()
const filepath = join(options.workspaceRoot, '.changeset', filename)
Expand Down

0 comments on commit f7134e5

Please sign in to comment.