changeset 25030:62186547b752 stable

pkg.m: remove yes-no question when installing from URI. * scripts/pkg/pkg.m: graft 70490bb1f59d (which has incorrect message) which basically reverts a26f8c97df21
author Carnë Draug <carandraug@octave.org>
date Thu, 22 Mar 2018 08:18:27 +0100
parents 91671d57817e
children a1e391e33004
files scripts/pkg/pkg.m
diffstat 1 files changed, 8 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Tue Mar 27 16:51:29 2018 -0700
+++ b/scripts/pkg/pkg.m	Thu Mar 22 08:18:27 2018 +0100
@@ -421,27 +421,14 @@
 
             for file_idx = find (external_files_mask)
 
-              warning ('Octave:security',
-              ['You are installing from an unofficial source.\n' ...
-               'The GNU Octave community is not responsible' ...
-               ' for the content of this package.\n' ...
-               '%s will be downloaded and installed.\n'],
-               files{file_idx});
-              _yes = yes_or_no ('Are you sure you want to do this? ');
-
-              if (_yes)
-                [~, fname, fext] = fileparts (files{file_idx});
-                local_files{end+1} = fullfile (tmp_dir, [fname fext]);
-
-                [~, success, msg] = urlwrite (files{file_idx}, local_files{end});
-                if (success != 1)
-                  error ("pkg: failed to read package '%s': %s",
-                         files{file_idx}, msg);
-                endif
-                files{file_idx} = local_files{end};
-              else
-                files(file_idx) = [];
-              endif # do remote install
+              [~, fname, fext] = fileparts (files{file_idx});
+              local_files{end+1} = fullfile (tmp_dir, [fname fext]);
+              [~, success, msg] = urlwrite (files{file_idx}, local_files{end});
+              if (success != 1)
+                error ("pkg: failed to read package '%s': %s",
+                       files{file_idx}, msg);
+              endif
+              files{file_idx} = local_files{end};
 
             endfor
           endif