File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,14 @@ import * as tc from "@actions/tool-cache";
66async function run ( ) : Promise < void > {
77 try {
88 const version = core . getInput ( "version" ) ;
9- const emacs_dot_var = "emacs-" + version ;
10- const emacs_dash_ver = emacs_dot_var . replace ( "." , "-" ) ;
9+ const ver_lst = version . split ( "." ) ;
10+ const emacs_major_ver = ver_lst [ 0 ] ;
11+ const emacs_minor_ver = ver_lst [ 1 ] ;
12+ const emacs_dot_var = "emacs-" + emacs_major_ver + "." + emacs_minor_ver ;
13+ const emacs_dash_ver = "emacs-" + emacs_major_ver + "-" + emacs_minor_ver ;
1114
1215 core . startGroup ( "Installing Emacs" ) ;
13- const ftpUrl = "https://ftp.gnu.org/gnu/emacs/windows/" + emacs_dash_ver + "/" ;
16+ const ftpUrl = "https://ftp.gnu.org/gnu/emacs/windows/" + emacs_major_ver + "/" ;
1417 let zipPath = ftpUrl + emacs_dot_var ;
1518
1619 switch ( emacs_dot_var ) {
You can’t perform that action at this time.
0 commit comments