Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CWD is not set properly #105

Open
purplecabbage opened this issue Sep 14, 2024 · 2 comments
Open

CWD is not set properly #105

purplecabbage opened this issue Sep 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@purplecabbage
Copy link
Member

purplecabbage commented Sep 14, 2024

Describe the bug

For any actions that read/write from the file system cwd is mapped to the application dir, meaning wherever the developer typed aio app dev

If an action uses the include directive, it should be able to load these files during run. Currently they are not found because we run in a different dir than the action root.

To Reproduce
Steps to reproduce the behavior:

  1. define an action with an include file
include:
  - ['actions/included/includeMePlease.txt']
  1. try to open and read the file in your action
const message = fs.readFileSync('./includeMePlease.txt', 'utf8')

Expected behavior
File is read, and text is output either to console, or returned.

Actual Behavior
crash ...
ENOENT: no such file or directory, open './includeMePlease.txt'

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@purplecabbage purplecabbage added the bug Something isn't working label Sep 14, 2024
@purplecabbage purplecabbage self-assigned this Sep 14, 2024
@aiojbot
Copy link

aiojbot commented Sep 14, 2024

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3186

@purplecabbage
Copy link
Member Author

pr #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants