Skip to content

Commit

Permalink
fix: respect LIMA_HOME environment variable
Browse files Browse the repository at this point in the history
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
  • Loading branch information
afbjorklund authored and benoitf committed Jul 18, 2023
1 parent 85414b5 commit 49d1b88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/lima/src/extension.ts
Expand Up @@ -48,8 +48,8 @@ function registerProvider(
export async function activate(extensionContext: extensionApi.ExtensionContext): Promise<void> {
const engineType = configuration.getConfiguration('lima').get('type') || 'podman';
const instanceName = configuration.getConfiguration('lima').get('name') || engineType;
const limaHome = os.homedir(); // TODO: look for the LIMA_HOME environment variable
const socketPath = path.resolve(limaHome, '.lima/' + instanceName + '/sock/' + engineType + '.sock');
const limaHome = 'LIMA_HOME' in process.env ? process.env['LIMA_HOME'] : os.homedir() + '/.lima';
const socketPath = path.resolve(limaHome, instanceName + '/sock/' + engineType + '.sock');

let provider;
if (fs.existsSync(socketPath)) {
Expand Down

0 comments on commit 49d1b88

Please sign in to comment.