Skip to content

Resolved destination path bug #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions unity_app_generator/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# Defaulty name of place where application generation state data is kept
DEFAULT_STATE_DIRECTORY = ".unity_app_gen"

def state_directory_path(state_directory=None):
def state_directory_path(state_directory=None, destination_directory=None):
"Resolve a path to the state directory based on which arguments are provided"

if state_directory is not None:
return os.path.realpath(state_directory)

if destination_directory is not None:
return os.path.realpath(os.path.join(destination_directory, DEFAULT_STATE_DIRECTORY))

return os.path.realpath(os.path.join(os.curdir, DEFAULT_STATE_DIRECTORY))

Expand All @@ -33,7 +36,7 @@ def check_state_directory(state_dir):
def init(state_directory, source_repository, destination_directory=None, checkout=None, **kwargs):
"Initialize a Git repository for use by subsequent commands"

state_dir = state_directory_path(state_directory)
state_dir = state_directory_path(state_directory, destination_directory)

app_gen = UnityApplicationGenerator(state_dir, source_repository, destination_directory, checkout)

Expand Down
2 changes: 1 addition & 1 deletion unity_app_generator/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="1.1.0"
__version__="1.1.1"