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

FindFirstFile : The system cannot find the path specified #14

Open
sabrite opened this issue Mar 4, 2019 · 9 comments
Open

FindFirstFile : The system cannot find the path specified #14

sabrite opened this issue Mar 4, 2019 · 9 comments

Comments

@sabrite
Copy link

sabrite commented Mar 4, 2019

Ok here is the setup. On my C drive, I have a folder named "Policies" and inside that there is one rego file and one input.json file. No matter what command I try, I keep getting this error:

FindFirstFile \Policies: The system cannot find the path specified. I have tried placing input.json a level above but to no avail. Any quick ideas how can I run "Evaluate Selection" Or "Check File Syntax" on a rego file. Thanks,

@tsandall
Copy link
Member

tsandall commented Mar 4, 2019

@usmanibnesadiq I haven't seen that error before. This sounds like something Windows-specific or perhaps specific to your environment. It sounds like a file open operation is failing. Perhaps a file path is not being supplied properly.

@sabrite
Copy link
Author

sabrite commented Mar 5, 2019

Hello Torin, thanks for getting back. Yes this is happening on Windows in VS Code. I am not sure where I need to provide a file path. Ok to troubleshoot and learn from you, I have created a very very simple repo here [https://github.com/usmanibnesadiq/sample-rego]

It just has one policy (.rego) and one input.json file. If you clone this and open this as folder/workspace in VSCode on windows, and try to run "OPA: Evaluate Selection" or any other command, you will get the same error message.

Can you please look into it and see if its only me or generic issue on Windows? I appreciate your time. Thanks,

@tsandall
Copy link
Member

tsandall commented Mar 5, 2019

@usmanibnesadiq I will take a look in the next day or so. I'm a bit busy right now but will definitely get to it this week. In the mean time, if you can use Mac OS or Linux it should work fine.

tsandall added a commit that referenced this issue Mar 8, 2019
The install check was using command-exists to check if an absolute
path was present--which does not seem to work on Windows. Instead,
just check if the file exists at all.

Fixes #14
Fixes #9

Signed-off-by: Torin Sandall <[email protected]>
@sabrite
Copy link
Author

sabrite commented Mar 11, 2019

Hello Torin, has the extension been updated with this fix? I re-installed the extension, cleared vscode extensions cache but still getting the same issue. any thoughts? Thanks,

@tsandall
Copy link
Member

tsandall commented Mar 11, 2019

oops, @usmanibnesadiq, I will reopen this. I wasn't able to reproduce this specific issue, however, I was able to fix the "opa.path" configuration issue. The extension was working fine inside a Windows 10 VM. Here's a screenshot of it working...

Screenshot from 2019-03-10 18-46-34

Make sure you have the OPA executable installed correctly. Also, we only have 64-bit executables, so if you're on Windows 32-bit, you'll need to build from source.

@tsandall tsandall reopened this Mar 11, 2019
@Raghuvorkady
Copy link

Same log file is being created randomly in my windows 10 64bit machine....
Can anyone help me...

@tanmaysarin
Copy link

@Raghuvorkady to work with opa in VS code --

To use Evaluate Selection

Double click on the policy name, in your case, test

Now run Evaluate Selection It should work fine.

Refer to this website for more info: link

(Read chapter 2)

@tanmaysarin
Copy link

I am only able to run the opa commands via VS code, and not via terminal on my windows 64bit machine.

@anderseknert
Copy link
Member

Is anyone still seeing this issue?

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

5 participants