Skip to content

Commit

Permalink
resolve proper product directory name when tailing the logs oopsy
Browse files Browse the repository at this point in the history
  • Loading branch information
viqueen committed Nov 8, 2022
1 parent 23af93d commit 8b9d733
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 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": "atlassian-devbox",
"version": "2.0.0",
"version": "2.0.1",
"description": "atlassian devbox",
"preferGlobal": true,
"bin": {
Expand Down
10 changes: 6 additions & 4 deletions src/lib/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export const product = ({
groupId,
webappName
}: ProductDefinition): Product => {
const _product = (productVersion: string) => {
return `amps-standalone-${name}-${productVersion}`;
};

const _runStandalone = (
{
ampsVersion,
Expand Down Expand Up @@ -93,7 +97,7 @@ export const product = ({
const directory = home();
const file = path.resolve(
directory,
`amps-standalone-${productVersion}`,
_product(productVersion),
'target',
`${name}-LATEST.log`
);
Expand All @@ -111,9 +115,7 @@ export const product = ({
const directory = home();
return fs
.readdirSync(directory)
.filter((d) =>
d.startsWith(`amps-standalone-${name}-${productVersion}`)
)
.filter((d) => d.startsWith(_product(productVersion)))
.map((d) => {
if (absolutePath) return path.resolve(directory, d);
return d;
Expand Down

0 comments on commit 8b9d733

Please sign in to comment.