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

rpk: wasm generate falsely claims that some files exist when passing an existing directory #4433

Closed
r-vasquez opened this issue Apr 26, 2022 · 0 comments · Fixed by #4580
Closed
Assignees
Labels
area/rpk kind/bug Something isn't working

Comments

@r-vasquez
Copy link
Contributor

Version & Environment

Redpanda version: v21.11.12 (rev 937b9fe)

What went wrong?

When we create an npm template project using rpk wasm generate <project directory> and the project directory already exists, rpk will falsely claim that some files exist.

# /tmp/foo already exist

$ rpk wasm generate /tmp/foo 
unable to generate all manifest files: Files [/tmp/foo/src/main.js /tmp/foo/test/main.test.js /tmp/foo/package.json /tmp/foo/webpack.js] already exist, avoiding generation.

# neither main.js, main.test.js, package.json nor webpack.js exist

What should have happened instead?

rpk to print an error indicating that the directory already exists and a suggestion to use the command with a non-existent directory path.

rpk wasm generate --help should indicate that the argument should be a non-existent directory path

How to reproduce the issue?

  1. Create an empty directory (e.g /tmp/wasmFoo)
  2. run rpk wasm generate /tmp/wasmFoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant