@@ -1409,22 +1409,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
14091409 step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
14101410 } ) ;
14111411} ;
1412+ var __importDefault = ( this && this . __importDefault ) || function ( mod ) {
1413+ return ( mod && mod . __esModule ) ? mod : { "default" : mod } ;
1414+ } ;
14121415Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
14131416const core = __importStar ( __webpack_require__ ( 186 ) ) ;
14141417const exec = __importStar ( __webpack_require__ ( 514 ) ) ;
14151418const tc = __importStar ( __webpack_require__ ( 784 ) ) ;
1419+ const fs_1 = __importDefault ( __webpack_require__ ( 747 ) ) ;
14161420function run ( ) {
14171421 return __awaiter ( this , void 0 , void 0 , function * ( ) {
14181422 try {
14191423 const PATH = process . env . PATH ;
14201424 const version = core . getInput ( "version" ) ;
1421- const ver_lst = version . split ( "." ) ;
1422- const emacs_major_ver = ver_lst [ 0 ] ;
1423- const emacs_minor_ver = ver_lst [ 1 ] ;
1424- const dot_ver = emacs_major_ver + "." + emacs_minor_ver ;
1425- const dash_ver = emacs_major_ver + "-" + emacs_minor_ver ;
1426- const emacs_dot_var = "emacs-" + dot_ver ;
1427- const emacs_dash_ver = "emacs-" + dash_ver ;
1425+ const ver_lst = version . split ( "." ) ; // if 27.1
1426+ const emacs_major_ver = ver_lst [ 0 ] ; // 27
1427+ const emacs_minor_ver = ver_lst [ 1 ] ; // 1
1428+ const dot_ver = emacs_major_ver + "." + emacs_minor_ver ; // 27.1
1429+ const dash_ver = emacs_major_ver + "-" + emacs_minor_ver ; // 27-1
1430+ const emacs_dot_var = "emacs-" + dot_ver ; // emacs-27.1
14281431 core . startGroup ( "Installing Emacs" ) ;
14291432 const ftpUrl = "https://ftp.gnu.org/gnu/emacs/windows/emacs-" + emacs_major_ver + "/" ;
14301433 let zipPath = ftpUrl + emacs_dot_var ;
@@ -1465,7 +1468,10 @@ function run() {
14651468 const emacsZip = yield tc . downloadTool ( zipPath ) ;
14661469 const emacsDir = yield tc . extractZip ( emacsZip , __dirname ) ;
14671470 yield exec . exec ( "dir dist" ) ;
1468- const emacsBin = emacsDir + "\\bin" ;
1471+ let emacsBin = emacsDir + "\\bin" ;
1472+ if ( fs_1 . default . existsSync ( emacsBin ) ) {
1473+ emacsBin = emacsDir + "\\" + emacs_dot_var + "\\bin" ;
1474+ }
14691475 console . log ( "emacsBin: " + emacsBin ) ;
14701476 const cachtedPath = yield tc . cacheDir ( emacsBin , "emacs" , dot_ver ) ;
14711477 core . addPath ( cachtedPath ) ;
0 commit comments