Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 3d759f9

Browse files
committed
Fix up code, and send path to isUmbrellaProject
1 parent 2d75811 commit 3d759f9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/init.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,17 @@ const isMixProject = async (filePath) => {
7171
const isUmbrellaProject = async (filePath) => {
7272
const project = await elixirProjectPath(filePath);
7373
return existsSync(join(project, 'apps'));
74-
}
74+
};
7575

7676
const isTestFile = async (filePath) => {
7777
const project = await elixirProjectPath(filePath);
7878
const relativePath = relative(project, filePath);
79-
if (isUmbrellaProject()) {
79+
if (isUmbrellaProject(filePath)) {
8080
// Is the structure "apps/app_name/test/..."
8181
return relativePath.split(sep)[2] === 'test';
82-
} else {
83-
// Is the structure "test/..."
84-
return relativePath.split(sep)[0] === 'test';
8582
}
83+
// Is the structure "test/..."
84+
return relativePath.split(sep)[0] === 'test';
8685
};
8786

8887
const isForcedElixirc = () => forceElixirc;

0 commit comments

Comments
 (0)