Allow "spack install foo@git-hash" without terminal prompt (#29827)
Do not prompt user with checksum warning when using git commit hashes as versions. Spack was incorrectly reporting this as a potential problem: it would display a prompt asking the user whether they want to proceed if Spack was running in a terminal, or it would terminate the running instance of Spack if running as part of a script.
This commit is contained in:
parent
ea61a657ae
commit
a58fa289b9
@ -1474,7 +1474,8 @@ def do_fetch(self, mirror_only=False):
|
||||
|
||||
checksum = spack.config.get('config:checksum')
|
||||
fetch = self.stage.managed_by_spack
|
||||
if checksum and fetch and self.version not in self.versions:
|
||||
if checksum and fetch and (self.version not in self.versions) \
|
||||
and (not self.version.is_commit):
|
||||
tty.warn("There is no checksum on file to fetch %s safely." %
|
||||
self.spec.cformat('{name}{@version}'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user