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 when run a configuration in Goland 2022.3 #205

Open
guilhermedalmarco opened this issue Dec 9, 2022 · 2 comments
Open

Error when run a configuration in Goland 2022.3 #205

guilhermedalmarco opened this issue Dec 9, 2022 · 2 comments

Comments

@guilhermedalmarco
Copy link

I've upgraded my Goland using ToolBox and after that when I try to run any configuration that is using EnvFile I got this error and I need to restart the IDE:

java.lang.RuntimeException: Failed to patch command line
	at com.goide.execution.extension.GoRunConfigurationExtensionsManager.lambda$patchCommandLine$1(GoRunConfigurationExtensionsManager.java:60)
	at com.intellij.execution.configuration.RunConfigurationExtensionsManager.processEnabledExtensions(RunConfigurationExtensionsManager.kt:228)
	at com.goide.execution.extension.GoRunConfigurationExtensionsManager.patchCommandLine(GoRunConfigurationExtensionsManager.java:55)
	at com.goide.execution.GoRunningState.lambda$patchCommandLine$5(GoRunningState.java:350)
	at com.goide.util.GoLocalEnvironmentRequest$GoLocalRemoteEnvironment.createGeneralCommandLine(GoLocalEnvironmentRequest.java:143)
	at com.intellij.execution.target.local.LocalTargetEnvironment.createProcess(LocalTargetEnvironment.java:129)
	at com.goide.util.GoExecutor$3.getProcessHandler(GoExecutor.java:579)
	at com.goide.util.GoExecutor$3.run(GoExecutor.java:531)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:425)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:476)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.intellij.execution.ExecutionException: java.io.IOException: Cannot run program "/Users/guilhermedalmarco/Development/Repositories/traive-finance/financial-business-and-commerce/pricing-api-service/.env-example": error=13, Permission denied
	at net.ashald.envfile.platform.EnvFileEnvironmentVariables.render(EnvFileEnvironmentVariables.java:76)
	at net.ashald.envfile.products.goland.GolandRunConfigurationExtension.patchCommandLine(GolandRunConfigurationExtension.java:37)
	at com.goide.execution.extension.GoRunConfigurationExtensionsManager.lambda$patchCommandLine$1(GoRunConfigurationExtensionsManager.java:57)
	... 27 more
Caused by: net.ashald.envfile.exceptions.InvalidEnvFileException: java.io.IOException: Cannot run program "/Users/guilhermedalmarco/Development/Repositories/traive-finance/financial-business-and-commerce/pricing-api-service/.env-example": error=13, Permission denied
	at net.ashald.envfile.providers.EnvFileExecutor$ReadStdoutAsUtf8.execute(EnvFileExecutor.java:56)
	at net.ashald.envfile.providers.SingleFileEnvVarsProvider.execute(SingleFileEnvVarsProvider.java:45)
	at net.ashald.envfile.providers.SingleFileEnvVarsProvider.getEnvVars(SingleFileEnvVarsProvider.java:38)
	at net.ashald.envfile.platform.EnvFileEnvironmentVariables.render(EnvFileEnvironmentVariables.java:67)
	... 29 more
Caused by: java.io.IOException: Cannot run program "/Users/guilhermedalmarco/Development/Repositories/traive-finance/financial-business-and-commerce/pricing-api-service/.env-example": error=13, Permission denied
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
	at net.ashald.envfile.providers.EnvFileExecutor$ReadStdoutAsUtf8.execute(EnvFileExecutor.java:44)
	... 32 more
Caused by: java.io.IOException: error=13, Permission denied
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
	... 34 more

@xmeehan
Copy link

xmeehan commented Feb 20, 2023

In the list of envfiles there is a column of checkboxes for "Executable" next to each file. Is that checked next to your file? If so, try unchecking it.

@cmmoran
Copy link

cmmoran commented Mar 23, 2023

Shot in the dark, but can you take a look at the .env-example file and see if the execution bit is set?

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

3 participants