Skip to content

Commit

Permalink
Set igncr using BASH_ENV instead of SHELLOPTS
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk authored and smorimoto committed Jan 8, 2025
1 parent c847188 commit 28ddebe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
9 changes: 6 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/setup-ocaml/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export const CYGWIN_ROOT = path.join("D:", "cygwin");

export const CYGWIN_ROOT_BIN = path.join(CYGWIN_ROOT, "bin");

export const CYGWIN_BASH_ENV = path.join(CYGWIN_ROOT, "bash_env");

export const DUNE_CACHE_ROOT = (() => {
const homeDir = os.homedir();
const xdgCacheHome = process.env.XDG_CACHE_HOME;
Expand Down
5 changes: 4 additions & 1 deletion packages/setup-ocaml/src/installer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as fs from "node:fs/promises";
import * as os from "node:os";
import * as process from "node:process";
import * as core from "@actions/core";
Expand All @@ -10,6 +11,7 @@ import {
saveOpamCache,
} from "./cache.js";
import {
CYGWIN_BASH_ENV,
CYGWIN_ROOT_BIN,
DUNE_CACHE,
DUNE_CACHE_ROOT,
Expand Down Expand Up @@ -47,7 +49,6 @@ export async function installer() {
core.exportVariable("CYGWIN", "winsymlinks:native");
core.exportVariable("HOME", process.env.USERPROFILE);
core.exportVariable("MSYS", "winsymlinks:native");
core.exportVariable("SHELLOPTS", "igncr");
await core.group(
"Change the file system behaviour parameters",
async () => {
Expand All @@ -70,6 +71,8 @@ export async function installer() {
if (!cygwinCacheHit) {
await saveCygwinCache();
}
await fs.writeFile(CYGWIN_BASH_ENV, "set -o igncr");
core.exportVariable("BASH_ENV", CYGWIN_BASH_ENV);
core.addPath(CYGWIN_ROOT_BIN);
}
await setupOpam();
Expand Down

0 comments on commit 28ddebe

Please sign in to comment.