}
}
return await checkPijulExecutable(path);
}
/**
* Search for a pijul executable under the user's .cargo directory
* @param outputChannel The output channel where logging information should be sent
*/
async function searchPijulCargoDirectory (outputChannel: vscode.OutputChannel): Promise<string | undefined> {
outputChannel.appendLine('Looking for Pijul installation in .cargo...');
const cargoBin = path.join(os.homedir(), '.cargo', 'bin');
// I can't find an async version of this function
if (fs.existsSync(cargoBin)) {
let cargoPijul = path.join(cargoBin, 'pijul');
if (fs.existsSync(cargoPijul)) {
return cargoPijul;
}
// Instead of checking if we're on windows or unix, just check if either exists
cargoPijul = cargoPijul + '.exe';
if (fs.existsSync(cargoPijul)) {
return cargoPijul;