Fix linters
This commit is contained in:
@@ -391,7 +391,6 @@ describe('upload-artifact', () => {
|
||||
.mockRestore()
|
||||
|
||||
const singleFile = path.join(fixtures.uploadDirectory, 'file1.txt')
|
||||
const expectedFileName = 'file1.txt'
|
||||
const expectedContent = 'test 1 file content'
|
||||
|
||||
jest
|
||||
|
||||
@@ -35,7 +35,9 @@ export async function createRawFileUploadStream(
|
||||
}
|
||||
|
||||
// Create a read stream from the file and pipe it to the upload stream
|
||||
const fileStream = fs.createReadStream(sourcePath, {highWaterMark: bufferSize})
|
||||
const fileStream = fs.createReadStream(sourcePath, {
|
||||
highWaterMark: bufferSize
|
||||
})
|
||||
|
||||
fileStream.on('error', error => {
|
||||
core.error('An error has occurred while reading the file for upload')
|
||||
|
||||
@@ -32,7 +32,7 @@ export async function uploadArtifact(
|
||||
): Promise<UploadArtifactResponse> {
|
||||
let artifactFileName = `${name}.zip`
|
||||
if (options?.skipArchive) {
|
||||
if (files.length > 1){
|
||||
if (files.length > 1) {
|
||||
throw new Error(
|
||||
'skipArchive option is only supported when uploading a single file'
|
||||
)
|
||||
@@ -86,7 +86,7 @@ export async function uploadArtifact(
|
||||
)
|
||||
}
|
||||
|
||||
let stream : WaterMarkedUploadStream
|
||||
let stream: WaterMarkedUploadStream
|
||||
|
||||
if (options?.skipArchive) {
|
||||
// Upload raw file without archiving
|
||||
@@ -101,10 +101,10 @@ export async function uploadArtifact(
|
||||
|
||||
core.info(`Uploading artifact: ${artifactFileName}`)
|
||||
const uploadResult = await uploadToBlobStorage(
|
||||
createArtifactResp.signedUploadUrl,
|
||||
stream,
|
||||
contentType
|
||||
)
|
||||
createArtifactResp.signedUploadUrl,
|
||||
stream,
|
||||
contentType
|
||||
)
|
||||
|
||||
// finalize the artifact
|
||||
const finalizeArtifactReq: FinalizeArtifactRequest = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import * as stream from 'stream'
|
||||
import {realpath} from 'fs/promises'
|
||||
import archiver from 'archiver'
|
||||
import * as core from '@actions/core'
|
||||
|
||||
Reference in New Issue
Block a user