Skip to content

Commit

Permalink
fix: .git can be a file or a directory
Browse files Browse the repository at this point in the history
fixes #6305
  • Loading branch information
Jason3S committed Oct 5, 2024
1 parent 24610c6 commit 18868d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 deletions.
2 changes: 1 addition & 1 deletion packages/cspell-gitignore/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function factoryPathHelper(path: PathInterface): PathHelper {
}

async function findRepoRoot(directory: string): Promise<string | undefined> {
const found = await findUp('.git', { cwd: directory, type: 'directory' });
const found = await findUp('.git', { cwd: directory });
if (!found) return undefined;
return path.dirname(found);
}
Expand Down
38 changes: 0 additions & 38 deletions packages/hunspell-reader/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,6 @@
"outFiles": [],
"sourceMaps": true,
"preLaunchTask": "npm: build"
},
{
"type": "node",
"request": "launch",
"name": "hunspell: Run Mocha Current File",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["--timeout", "999999", "--colors", "--require", "ts-node/register", "${file}"],
"internalConsoleOptions": "openOnSessionStart",
"env": { "NODE_ENV": "test" }
},
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "hunspell: Run mocha",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Request type "launch" or "attach"
"request": "launch",
// Workspace relative or absolute path to the program.
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
// Automatically stop program after launch.
"stopOnEntry": false,
// Command line arguments passed to the program.
"args": [
"--timeout",
"999999",
"--colors",
"--compilers",
"ts:ts-node/register",
"--recursive",
"dist/**/*.test.js"
],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": "${workspaceRoot}",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
"outFiles": ["${workspaceRoot}/dist/**/*.js"],
// Environment variables passed to the program.
"env": { "NODE_ENV": "test" }
}
]
}

0 comments on commit 18868d2

Please sign in to comment.