Skip to content

The open alternative to Salesforce, designed for AI.

fix(cli): make built binary executable (#27422)

Weiko8e05f13af963
diff --git a/packages/twenty-cli/vite.config.ts b/packages/twenty-cli/vite.config.ts
index 03394a2b14c..06392941017 100644
--- a/packages/twenty-cli/vite.config.ts
+++ b/packages/twenty-cli/vite.config.ts
@@ -1,4 +1,4 @@
-import { cp } from 'node:fs/promises';
+import { chmod, cp } from 'node:fs/promises';
import { builtinModules } from 'node:module';
import path from 'node:path';
import { defineConfig } from 'vite';
@@ -11,6 +11,12 @@ const NODE_BUILTIN_MODULES = new Set([
export default defineConfig({
root: __dirname,
plugins: [
+ {
+ name: 'make-cli-executable',
+ writeBundle: async () => {
+ await chmod(path.resolve(__dirname, 'dist/cli.cjs'), 0o755);
+ },
+ },
{
name: 'copy-app-template',
closeBundle: async () => {