@@ -20,7 +20,6 @@ import { EXIT_CODE_ABORTED, EXIT_CODE_TIMEOUT } from "../constants/exitCodes";
2020import { listLocalBranches } from "../git" ;
2121import { checkInitHookExists , getInitHookPath , createLineBufferedLoggers } from "./initHook" ;
2222import { execAsync } from "../utils/disposableExec" ;
23- import { findBashPath , findNicePath } from "./executablePaths" ;
2423import { getProjectName } from "../utils/runtime/helpers" ;
2524import { getErrorMessage } from "../utils/errors" ;
2625
@@ -53,12 +52,9 @@ export class LocalRuntime implements Runtime {
5352 ) ;
5453 }
5554
56- // Find bash path (important for CI environments where PATH may not be set)
57- const bashPath = findBashPath ( ) ;
58- const nicePath = findNicePath ( ) ;
59-
6055 // If niceness is specified, spawn nice directly to avoid escaping issues
61- const spawnCommand = options . niceness !== undefined ? nicePath : bashPath ;
56+ const spawnCommand = options . niceness !== undefined ? "nice" : "bash" ;
57+ const bashPath = "bash" ;
6258 const spawnArgs =
6359 options . niceness !== undefined
6460 ? [ "-n" , options . niceness . toString ( ) , bashPath , "-c" , command ]
@@ -328,19 +324,21 @@ export class LocalRuntime implements Runtime {
328324
329325 // Create parent directory if needed
330326 const parentDir = path . dirname ( workspacePath ) ;
331- // eslint-disable-next-line local/no-sync-fs-methods
332- if ( ! fs . existsSync ( parentDir ) ) {
333- // eslint-disable-next-line local/no-sync-fs-methods
334- fs . mkdirSync ( parentDir , { recursive : true } ) ;
327+ try {
328+ await fsPromises . access ( parentDir ) ;
329+ } catch {
330+ await fsPromises . mkdir ( parentDir , { recursive : true } ) ;
335331 }
336332
337333 // Check if workspace already exists
338- // eslint-disable-next-line local/no-sync-fs-methods
339- if ( fs . existsSync ( workspacePath ) ) {
334+ try {
335+ await fsPromises . access ( workspacePath ) ;
340336 return {
341337 success : false ,
342338 error : `Workspace already exists at ${ workspacePath } ` ,
343339 } ;
340+ } catch {
341+ // Workspace doesn't exist, proceed with creation
344342 }
345343
346344 // Check if branch exists locally
@@ -419,8 +417,7 @@ export class LocalRuntime implements Runtime {
419417 const loggers = createLineBufferedLoggers ( initLogger ) ;
420418
421419 return new Promise < void > ( ( resolve ) => {
422- const bashPath = findBashPath ( ) ;
423- const proc = spawn ( bashPath , [ "-c" , `"${ hookPath } "` ] , {
420+ const proc = spawn ( "bash" , [ "-c" , `"${ hookPath } "` ] , {
424421 cwd : workspacePath ,
425422 stdio : [ "ignore" , "pipe" , "pipe" ] ,
426423 } ) ;
0 commit comments