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

Missing ".exe" extension on Windows #55

Closed
aashis-kishore opened this issue Feb 18, 2022 · 1 comment
Closed

Missing ".exe" extension on Windows #55

aashis-kishore opened this issue Feb 18, 2022 · 1 comment
Labels
type: bug Something isn't working

Comments

@aashis-kishore
Copy link
Contributor

Description

Generated binary on Windows platform is missing the exe extension.

How to Replicate

  • Create an application on Windows platform
  • Run target build on the application
npx nx run <app_name>:build

Proposed Fix

// https://github.com/nx-go/nx-go/blob/main/packages/nx-go/src/executors/build/executor.ts

export default async function runExecutor(options: BuildExecutorSchema, context: ExecutorContext) {
  const mainFile = `${options.main}`

  // From
  // const output = `-o ${options.outputPath}`

  // To
  const output = `-o ${options.outputPath}${process.platform === 'win32' ? '.exe' : ''}`

  return runGoCommand(context, 'build', [output, mainFile])
}
@beeman
Copy link
Member

beeman commented Feb 20, 2022

This has been fixed in #56 and released as @nx-go/nx-go@2.2.0 🥳. Thanks!

@beeman beeman closed this as completed Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants