Смена относительного пути проекта на абсолютный, который исправляет проблему при работе с проектом во время добавления/восстановления
This commit is contained in:
		
							parent
							
								
									e43b792df8
								
							
						
					
					
						commit
						ee41d5f96d
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -158,7 +158,7 @@ class Snag {
 | 
			
		|||
		result = execute(_baseCommand ~ ["rev-parse", "--short", "HEAD"]);
 | 
			
		||||
		if (result.status == 128) {
 | 
			
		||||
			// Если это самый первый коммит после инициализации репозитория
 | 
			
		||||
			git(["add", "."], "Failed to prepare files for archiving");
 | 
			
		||||
			git(["add", _config.project], "Failed to prepare files for archiving");
 | 
			
		||||
			git(["commit", "-m"] ~ message, "Failed to create a snapshot");
 | 
			
		||||
			newSnapshot = git(
 | 
			
		||||
				["rev-parse", "--short", "HEAD"],
 | 
			
		||||
| 
						 | 
				
			
			@ -197,7 +197,7 @@ class Snag {
 | 
			
		|||
				"Failed to create a branch from the current state"
 | 
			
		||||
			);
 | 
			
		||||
			git(
 | 
			
		||||
				["add", "."],
 | 
			
		||||
				["add", _config.project],
 | 
			
		||||
				"Failed to prepare files for archiving"
 | 
			
		||||
			);
 | 
			
		||||
			git(
 | 
			
		||||
| 
						 | 
				
			
			@ -211,7 +211,7 @@ class Snag {
 | 
			
		|||
		} else {
 | 
			
		||||
			// Если коммит является посленим в ветке
 | 
			
		||||
			git(
 | 
			
		||||
				["add", "."],
 | 
			
		||||
				["add", _config.project],
 | 
			
		||||
				"Failed to prepare files for archiving"
 | 
			
		||||
			);
 | 
			
		||||
			git(
 | 
			
		||||
| 
						 | 
				
			
			@ -273,7 +273,7 @@ class Snag {
 | 
			
		|||
		);
 | 
			
		||||
		if (result.output.length) {
 | 
			
		||||
			git(
 | 
			
		||||
				["restore", "."],
 | 
			
		||||
				["restore", _config.project],
 | 
			
		||||
				"Failed to reset file changes state"
 | 
			
		||||
			);
 | 
			
		||||
			git(
 | 
			
		||||
| 
						 | 
				
			
			@ -406,7 +406,7 @@ class Snag {
 | 
			
		|||
		);
 | 
			
		||||
 | 
			
		||||
		// Создание нового снимка на основе состояния файлов из распакованного архива
 | 
			
		||||
		result = execute(customCommand ~ ["add", "."]);
 | 
			
		||||
		result = execute(customCommand ~ ["add", tempDirectory]);
 | 
			
		||||
		result.status &&
 | 
			
		||||
			throw new SnagException(
 | 
			
		||||
				"Failed to prepare files for archiving:\n"
 | 
			
		||||
| 
						 | 
				
			
			@ -427,7 +427,7 @@ class Snag {
 | 
			
		|||
 | 
			
		||||
		// Сброс состояния файлов
 | 
			
		||||
		git(
 | 
			
		||||
			["restore", "."],
 | 
			
		||||
			["restore", _config.project],
 | 
			
		||||
			"Failed to reset file changes state"
 | 
			
		||||
		);
 | 
			
		||||
		git(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue