Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Change from __dirname to process.cwd() #442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change from __dirname to process.cwd() #442

wants to merge 1 commit into from

Conversation

andrewshawcare
Copy link

We're using swagger-node from Docker and are using a local copy of the swagger script from ./node_modules/.bin/swagger to run ./node_modules/.bin/swagger project edit. This doesn't serve swagger-editor correctly as __dirname resolves to ./node_modules/swagger as this is where the script is running. We've made the above change to use process.cwd() so that we can reference swagger-editor correctly.

We're using swagger-node from Docker and are using a local copy of the swagger script from `./node_modules/.bin/swagger` to run `./node_modules/.bin/swagger project edit`. This doesn't serve `swagger-editor` correctly as `__dirname` resolves to `./node_modules/swagger` as this is where the script is running. We've made the above change to use `process.cwd()` so that we can reference swagger-editor correctly.
@andrewshawcare
Copy link
Author

...any updates on this? Looks like the build is failing for some other reason than our changes. We've tested this locally and from within our docker container.

@micmro
Copy link
Contributor

micmro commented Apr 25, 2017

You can try to run the tests again after rebasing from or merging in master? Should be fixed with 5bb2539

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants