envd
                                
                                 envd copied to clipboard
                                
                                    envd copied to clipboard
                            
                            
                            
                        bug(CLI): fail to use both path and file flag in envd up
envd up --path ./examples/mnist -f ./examples/mnist/build_gpu.envd 
error: no such file or directory
We use the path dir as the cwd, thus we cannot find the file ./examples/mnist/build_gpu.envd 
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
We can recording pwd as a global 'ENV_DIR' to support both path dir and the current dir.
Is it suitable?
We can recording pwd as a global 'ENV_DIR' to support both path dir and the current dir.
Is it suitable?
Could you please explain more about it?
We can recording pwd as a global 'ENV_DIR' to support both path dir and the current dir. Is it suitable?
Could you please explain more about it?
Just record the current working dir by using pwd() path as a secondary base search path when it is failed in using the path dir to find the file with-f.
Gotcha, SGTM. I think it works.
Is there a bug in https://github.com/tensorchord/envd/blob/53d8e13fc3cf39cd8a1c38e80d411096dd99e234/pkg/builder/util.go#L321-L338
So no matter what you pass to -f, it will always use the defaultbuild.envd. (Unless you specify the target function)
BTW, the -f description is "Function to execute, format file:func". Should we use filepath.Base() to extract the last element?
I think it is a bug.