mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			459 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			459 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| cleanup () {
 | |
|   unset -f die cleanup
 | |
| }
 | |
| die () { echo "$@" ; cleanup ; exit 1; }
 | |
| 
 | |
| \. ../../../nvm.sh
 | |
| 
 | |
| # nvm_get_artifact_compression by default
 | |
| [ "$(nvm_get_artifact_compression)" = 'tar.gz' ] || die 'nvm_get_artifact_compression should return "tar.gz" by default'
 | |
| 
 | |
| # nvm_get_artifact_compression with xz
 | |
| [ "$(nvm_get_artifact_compression "14.0.0")" = 'tar.xz' ] || die 'nvm_get_artifact_compression should return "tar.xz" for this version'
 | |
| 
 | |
| cleanup
 |