Skip to content

Commit

Permalink
fix macos execa not work
Browse files Browse the repository at this point in the history
  • Loading branch information
skimklin committed Dec 1, 2023
1 parent 69fc2b0 commit e17e2d7
Show file tree
Hide file tree
Showing 5 changed files with 256 additions and 255 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# macos
.DS_Store
5 changes: 2 additions & 3 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72274,10 +72274,10 @@ const executeOpenCMD = async (config, path) => {
const { openCMD } = config;
const command = openCMD ? openCMD.replaceAll(CMD_HOLDER, path) : `code ${path}`;
Log.info(`executing command: ${command}`);
await execa(command);
await execa(command, { shell: true });
};
const handleFindResult = async (originSearchString, config, findFolders) => {
if (!findFolders) {
if (!findFolders?.length) {
Log.error(`${originSearchString} not found`);
return;
}
Expand Down Expand Up @@ -72359,7 +72359,6 @@ if (!command) {
Log.error('required command');
process.exit(1);
}
Log.info(formatObjectJson(require$$1$1.parse(process.cwd())));
(async () => {
const config = await readConfig();
Log.debug('config:', formatObjectJson(config));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "code-opener-cli",
"version": "0.0.4",
"version": "0.0.5",
"description": "command line interface code opener",
"keywords": [
"cli"
Expand Down
2 changes: 1 addition & 1 deletion src/folderSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const executeOpenCMD = async (config: OpenerConfig, path: string) => {

const command = openCMD ? openCMD.replaceAll(CMD_HOLDER, path) : `code ${path}`;
Log.info(`executing command: ${command}`);
await execa(command);
await execa(command, { shell: true });
}

export const handleFindResult = async (originSearchString: string, config: OpenerConfig, findFolders?: string[]) => {
Expand Down
Loading

0 comments on commit e17e2d7

Please sign in to comment.