mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-01 08:23:16 +08:00
@@ -1,6 +1,8 @@
|
||||
import {ExitCode} from '@actions/exit'
|
||||
import {issue, issueCommand} from './command'
|
||||
|
||||
import * as path from 'path'
|
||||
|
||||
/**
|
||||
* Interface for getInput options
|
||||
*/
|
||||
@@ -33,6 +35,15 @@ export function exportSecret(name: string, val: string): void {
|
||||
issueCommand('set-secret', {}, val)
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepends inputPath to the PATH (for this action and future actions)
|
||||
* @param inputPath
|
||||
*/
|
||||
export function addPath(inputPath: string): void {
|
||||
issueCommand('add-path', {}, inputPath)
|
||||
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of an input. The value is also trimmed.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user