mirror of
				https://github.com/TheLocehiliosan/yadm
				synced 2025-06-13 13:03:58 +00:00 
			
		
		
		
	Explicitly read answers from /dev/tty
				
					
				
			This is necessary if **yadm** is started by piping it into `bash`.
This commit is contained in:
		
							parent
							
								
									7f6fe24280
								
							
						
					
					
						commit
						a612a98136
					
				
							
								
								
									
										4
									
								
								yadm
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								yadm
									
									
									
									
									
								
							| @ -395,7 +395,7 @@ function encrypt() { | |||||||
|   if [[ $archive_status =~ $archive_regex ]] ; then |   if [[ $archive_status =~ $archive_regex ]] ; then | ||||||
|     echo "It appears that $YADM_ARCHIVE is not tracked by yadm's repository." |     echo "It appears that $YADM_ARCHIVE is not tracked by yadm's repository." | ||||||
|     echo "Would you like to add it now? (y/n)" |     echo "Would you like to add it now? (y/n)" | ||||||
|     read -r answer |     read -r answer < /dev/tty | ||||||
|     if [[ $answer =~ ^[yY]$ ]] ; then |     if [[ $answer =~ ^[yY]$ ]] ; then | ||||||
|       "$GIT_PROGRAM" add "$(mixed_path "$YADM_ARCHIVE")" |       "$GIT_PROGRAM" add "$(mixed_path "$YADM_ARCHIVE")" | ||||||
|     fi |     fi | ||||||
| @ -707,7 +707,7 @@ function auto_bootstrap() { | |||||||
|     echo "Found $YADM_BOOTSTRAP" |     echo "Found $YADM_BOOTSTRAP" | ||||||
|     echo "It appears that a bootstrap program exists." |     echo "It appears that a bootstrap program exists." | ||||||
|     echo "Would you like to execute it now? (y/n)" |     echo "Would you like to execute it now? (y/n)" | ||||||
|     read -r answer |     read -r answer < /dev/tty | ||||||
|     if [[ $answer =~ ^[yY]$ ]] ; then |     if [[ $answer =~ ^[yY]$ ]] ; then | ||||||
|       bootstrap |       bootstrap | ||||||
|     fi |     fi | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user