From 2d5a2c15bc65f284c09fef229975ef10b0178ebb Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Mon, 25 Nov 2024 14:21:05 +0100 Subject: [PATCH] Fixes the issue 1861 on Pharo --- .../IceTipLocalRepositoryPanel.class.st | 4 +--- .../IceTipOptionDialogPresenter.class.st | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Iceberg-TipUI/IceTipLocalRepositoryPanel.class.st b/Iceberg-TipUI/IceTipLocalRepositoryPanel.class.st index d9382932e6..f973fef824 100644 --- a/Iceberg-TipUI/IceTipLocalRepositoryPanel.class.st +++ b/Iceberg-TipUI/IceTipLocalRepositoryPanel.class.st @@ -90,7 +90,5 @@ IceTipLocalRepositoryPanel >> validate [ self assert: self location exists description: 'Project location must exist!'. - self - assert: (IceRepositoryCreator isGitRoot: self location) - description: 'Project location does not seems to be a valid git repository.' + ] diff --git a/Iceberg-TipUI/IceTipOptionDialogPresenter.class.st b/Iceberg-TipUI/IceTipOptionDialogPresenter.class.st index 0febb5c23c..c0eadc7652 100644 --- a/Iceberg-TipUI/IceTipOptionDialogPresenter.class.st +++ b/Iceberg-TipUI/IceTipOptionDialogPresenter.class.st @@ -22,12 +22,22 @@ Class { { #category : 'actions' } IceTipOptionDialogPresenter >> accept [ - [ - self doAccept. - self closeWindow ] - on: IceError , IceWarning - do: [ :e | - e acceptError: (IceTipInteractiveErrorVisitor newContext: self) ] + [ + self selectedType class = IceTipLocalRepositoryPanel + ifTrue: [ + (IceRepositoryCreator isGitRoot: self selectedType location) + ifFalse: [ + self inform: ('"{1}" git repository not found' format: + { self selectedType location fullName }) ] + ifTrue: [ + self doAccept. + self closeWindow ] ] + ifFalse: [ + self doAccept. + self closeWindow ] ] + on: IceError , IceWarning + do: [ :e | + e acceptError: (IceTipInteractiveErrorVisitor newContext: self) ] ] { #category : 'accessing' }