Skip to content

Commit

Permalink
fix a rebuild crash in dummy apps on windows
Browse files Browse the repository at this point in the history
Rebuilds could crash on windows when working with a v1 addon's dummy app.

We already defend against the weird circularity of dummy apps, but the check didn't work on windows.

This has test coverage that will land as part of #1246, because that includes a refactor of the test suite that reveals this problem.
  • Loading branch information
ef4 committed Aug 17, 2022
1 parent 5849d11 commit aebec0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/compat/src/compat-addons.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Node } from 'broccoli-node-api';
import { join, relative, dirname, isAbsolute } from 'path';
import { join, relative, dirname, isAbsolute, sep } from 'path';
import { emptyDirSync, ensureSymlinkSync, ensureDirSync, realpathSync, copySync, writeJSONSync } from 'fs-extra';
import { Stage, Package, PackageCache, WaitForTrees, mangledEngineRoot } from '@embroider/core';
import V1InstanceCache from './v1-instance-cache';
Expand Down Expand Up @@ -123,7 +123,7 @@ export default class CompatAddons implements Stage {
// the addon, because that would overwrite the real app build.
ignore.push(rel);

if (rel === 'tests/dummy') {
if (rel === `tests${sep}dummy`) {
// special case: classic dummy apps are weird because they put the
// tests (which are truly part of the app, not the addon) inside the
// addon instead of inside the app.
Expand Down

0 comments on commit aebec0a

Please sign in to comment.