Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
make entrypointDir lookup more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
eladb committed Nov 3, 2023
1 parent f6e1b03 commit 6176c82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/containers",
"version": "0.0.4",
"version": "0.0.5",
"description": "Wing container support",
"publishConfig": {
"access": "public",
Expand Down
7 changes: 3 additions & 4 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ exports.shell = async function (command, args, cwd) {
};

exports.entrypointDir = function (scope) {
const entrypoint = wingsdk.core.App.of(scope).entrypointDir;
if (!entrypoint) {
throw new Error('Entrypoint directory not found');
if (typeof(scope.entrypointDir) == "string") {
return scope.entrypointDir;
}

return entrypoint;
return exports.entrypointDir(scope.node.scope);
};

exports.dirname = function() {
Expand Down

0 comments on commit 6176c82

Please sign in to comment.