Skip to content

Working directory not set correctly. #111

@LiamKarlMitchell

Description

@LiamKarlMitchell

I have several projects that I want to use trace gl on.

Like so
node tracegl ../ProjectDirectory/main.js

However it was trying to open files relative to tracegl's directory.
I would like to keep tracegl in one spot

Here is the solution.
Find the line for
if(a.match(/.js$/i) || isfile)

and modify it to be like so
if(a.match(/.js$/i) || isfile) {
dir = path.dirname(a);
out('gWorking Directory: ~~ '+dir+'\n');
process.chdir(dir);
return nodeJSMode(f, a, arg.slice(i+1), sender);
}

At the time of writing this was line 278

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions