Skip to content

Commit

Permalink
fix printed directory
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Oct 19, 2023
1 parent bc8d841 commit 1e04d0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/java/edu/wpi/first/gradlerio/GradleRIOPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void execute(Parameters parameters) {
@Override
public void apply(Project project) {
if (project.getRootDir().toString().toUpperCase().contains("ONEDRIVE")) {
throw new OneDriveException();
throw new OneDriveException(project);
}

project.getPluginManager().apply(DeployUtils.class);
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/edu/wpi/first/gradlerio/OneDriveException.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package edu.wpi.first.gradlerio;

public class OneDriveException extends java.lang.RuntimeException {
public OneDriveException() {
super(String.format("Error cannot create project inside OneDrive. Project Directory = %S", System.getProperty("user.dir")));
PrintMessage();
}
import org.gradle.api.Project;

public void PrintMessage() {
System.out.println(String.format("Error cannot create project inside OneDrive. Project Directory = %S", System.getProperty("user.dir")));
public class OneDriveException extends java.lang.RuntimeException {
public OneDriveException(Project project) {
super(String.format("Error cannot create project inside OneDrive. Project Directory = %S", project.getRootDir().toString()));
System.out.println(String.format("Error cannot create project inside OneDrive. Project Directory = %S", project.getRootDir().toString()));
}

}

0 comments on commit 1e04d0d

Please sign in to comment.