1
0
Fork 0

Add env variable to enable windows symlinks

pull/1291/head
Sampark Sharma 2022-12-29 07:44:47 +00:00 committed by GitHub
parent 4e74c1c052
commit 2867e318d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import * as exec from '@actions/exec' import * as exec from '@actions/exec'
import {exportVariable} from '@actions/core'
import * as io from '@actions/io' import * as io from '@actions/io'
import * as path from 'path' import * as path from 'path'
import { import {
@ -14,6 +15,8 @@ import * as utils from '../src/internal/cacheUtils'
// eslint-disable-next-line @typescript-eslint/no-require-imports // eslint-disable-next-line @typescript-eslint/no-require-imports
import fs = require('fs') import fs = require('fs')
exportVariable('MSYS', 'winsymlinks:nativestrict')
jest.mock('@actions/exec') jest.mock('@actions/exec')
jest.mock('@actions/io') jest.mock('@actions/io')

View File

@ -1,4 +1,5 @@
import {exec} from '@actions/exec' import {exec} from '@actions/exec'
import {exportVariable} from '@actions/core'
import * as io from '@actions/io' import * as io from '@actions/io'
import {existsSync, writeFileSync} from 'fs' import {existsSync, writeFileSync} from 'fs'
import * as path from 'path' import * as path from 'path'
@ -13,6 +14,7 @@ import {
} from './constants' } from './constants'
const IS_WINDOWS = process.platform === 'win32' const IS_WINDOWS = process.platform === 'win32'
exportVariable('MSYS', 'winsymlinks:nativestrict')
// Returns tar path and type: BSD or GNU // Returns tar path and type: BSD or GNU
async function getTarPath(): Promise<ArchiveTool> { async function getTarPath(): Promise<ArchiveTool> {