Skip to content

Commit ebf332c

Browse files
committedNov 28, 2024··
fix: delete file using full path
1 parent 1bc51d5 commit ebf332c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎src/check-project/utils.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,15 @@ export async function ensureFileHasContents (projectDir, filePath, expectedConte
123123
* @param {string} filePath
124124
*/
125125
export async function ensureFileNotPresent (projectDir, filePath) {
126-
const fileExists = fs.existsSync(path.join(projectDir, filePath))
126+
const fullPath = path.join(projectDir, filePath)
127+
const fileExists = fs.existsSync(fullPath)
127128

128129
if (fileExists) {
129130
if (process.env.CI) {
130131
throw new Error(`${filePath} exists`)
131132
}
132133

133-
console.warn(kleur.yellow(`${filePath} exist`))
134+
console.warn(kleur.yellow(`${filePath} exists`))
134135

135136
const { removeFile } = await prompt.get({
136137
properties: {
@@ -146,7 +147,7 @@ export async function ensureFileNotPresent (projectDir, filePath) {
146147
throw new Error(`Not removing ${filePath} file`)
147148
}
148149

149-
fs.rmSync(filePath)
150+
fs.rmSync(fullPath)
150151
}
151152
}
152153

‎src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export const usesReleasePlease = (dir = process.cwd()) => {
295295
encoding: 'utf-8'
296296
})
297297

298-
return contents.includes('uses: google-github-actions/release-please-action')
298+
return contents.includes('release-please-action')
299299
} catch {
300300
return false
301301
}

0 commit comments

Comments
 (0)
Please sign in to comment.