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

Error: /usr/local/bin/build.sh: line 35: //.cargo/env: No such file or directory #318

Closed
RaviH opened this issue Apr 13, 2021 · 4 comments
Closed

Comments

@RaviH
Copy link

RaviH commented Apr 13, 2021

Hello,

I downloaded your repo and ran from tests/test-func directory and got the error above:

docker run --rm \     
    -u $(id -u):$(id -g) \
    -v ${PWD}:/code \
    -v ${HOME}/.cargo/registry:/cargo/registry \
    -v ${HOME}/.cargo/git:/cargo/git \
    softprops/lambda-rust
/usr/local/bin/build.sh: line 35: //.cargo/env: No such file or directory

There's a workaround for it:

https://www.gitmemory.com/issue/softprops/lambda-rust/84/784833248:

I also just hit this issue but was able to resolve it by building the container from master.

Try cloning the repo and just running make build in the root of the repo. Annoyingly this means that the fix will only apply to your local docker install so won't help if you are using CICD. For that case you will need to push to a container registry and use your repository until a fixed build is pushed to the softprops repo.

Please correct me where I am wrong. But it's a bug if we have to build the project ourselves, right?

@bahildebrand
Copy link
Contributor

This looks like an issue with an upstream repo. Did you mean to post this in https://github.com/softprops/lambda-rust/? Additionally that test-func crate appears to be using an older version of this project. That could be causing issues.

@RaviH
Copy link
Author

RaviH commented Apr 14, 2021

@bahildebrand I really don't know where the issue lies. Let me elaborate: I was able to reproduce the error with tests/test-func as well as on my company's project. To get around it I am downloading this project and running make build on it as the answer suggested which seems to fix the issue. So if you release a new version after running make build on this project, shouldn't that fix the problem? If the problem was upstream, why should running make build on this project fix the issue? Thinking out loud here.

@bahildebrand
Copy link
Contributor

The only thing that could maybe cause that is that test-func is on an older version of this crate. It is on 0.2, whereas the latest released version is 0.3. Other than that I would suggest opening this issue in the other repo, as it is not supported by us. If you're able to pinpoint that it is an issue in this repo, and not lambda-rust then feel free to re-open this issue. Otherwise I'm closing it, as it seems unrelated to this repo.

@RaviH
Copy link
Author

RaviH commented Apr 19, 2021

I am sorry, I meant to open it with the downstream repo and I thought I did :) Here's the issue already open in softprops/lambda-rust: softprops/lambda-rust#84

Thank you for your patience.

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

No branches or pull requests

2 participants