Skip to content

Commit

Permalink
fix: watch path resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRomaa committed Jul 12, 2023
1 parent f3209b3 commit 4048596
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synaptic-simulations/mach",
"version": "1.0.2",
"version": "1.0.3",
"description": "The last MSFS instrument bundler you'll ever need.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ export async function buildInstrument(config: MachConfig, instrument: Instrument
}

function resolveFilename(input: string): string {
return path.resolve(input.slice(input.indexOf(process.cwd())));
const cwdIndex = input.indexOf(process.cwd());
return path.resolve(cwdIndex >= 0 ? input.slice(cwdIndex) : input);
}

export async function watchInstrument(config: MachConfig, instrument: Instrument, logger: BuildLogger, module = false): Promise<BuildResultWithMeta> {
Expand Down

0 comments on commit 4048596

Please sign in to comment.