File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { coerce, satisfies } from 'semver';
55import { ServerOptions } from '../types' ;
66import getBinaryURL from '../src/libraries/Version' ;
77import { DOWNLOADABLE_MYSQL_VERSIONS } from '../src/constants' ;
8+ import fs from 'fs'
89import fsPromises from 'fs/promises'
910import os from 'os'
1011
@@ -61,7 +62,8 @@ test('dummy test', () => {
6162} )
6263
6364afterAll ( async ( ) => {
64- if ( process . env . MOVE_MYSQLMSN_TO ) {
65- await fsPromises . rename ( `${ os . tmpdir ( ) } /mysqlmsn` , process . env . MOVE_MYSQLMSN_TO )
65+ const originalPath = `${ os . tmpdir ( ) } /mysqlmsn`
66+ if ( process . env . MOVE_MYSQLMSN_TO && fs . existsSync ( originalPath ) ) {
67+ await fsPromises . rename ( originalPath , process . env . MOVE_MYSQLMSN_TO )
6668 }
6769} )
You can’t perform that action at this time.
0 commit comments