-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: fix not finding the binary in another directory (#49)
- Loading branch information
Showing
24 changed files
with
216 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman.exe'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman.exe', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["../../.eslintrc"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import url from 'node:url'; | ||
|
||
export default path.join(url.fileURLToPath(new URL('.', import.meta.url)), 'chdman.exe'); | ||
/** | ||
* Search for a {@link fileName} in {@link filePath} or any of its parent directories. | ||
*/ | ||
function scanUpPathForFile(filePath: string, fileName: string): string | undefined { | ||
const fullPath = path.join(filePath, fileName); | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
|
||
const parentPath = path.dirname(filePath); | ||
if (parentPath !== filePath) { | ||
return scanUpPathForFile(path.dirname(filePath), fileName); | ||
} | ||
|
||
return undefined; | ||
} | ||
|
||
export default scanUpPathForFile( | ||
url.fileURLToPath(new URL('.', import.meta.url)), | ||
'chdman.exe', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters