Skip to content

Commit

Permalink
fix: add missed bin script extension
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Oct 22, 2024
1 parent f57e3f0 commit 40a45f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { fileURLToPath } from 'node:url'
import path from 'node:path'
import fs from 'node:fs'

import { binaries } from '../bin/todoctor'
import { binaries } from '../bin/todoctor.js'

let filename = fileURLToPath(import.meta.url)
let dirname = path.dirname(filename)

Object.values(binaries).forEach(binaryPath => {
fs.chmodSync(path.join(dirname, '../bin/', binaryPath), 0o755)
let fullBinaryPath = path.join(dirname, '../bin/', binaryPath)
if (fs.existsSync(fullBinaryPath)) {
fs.chmodSync(path.join(dirname, '../bin/', binaryPath), 0o755)
}
})

0 comments on commit 40a45f5

Please sign in to comment.