Skip to content

Commit a62d099

Browse files
authored
Merge pull request #32 from unity-sds/bug/dest-dir
Resolved destination path bug
2 parents 1812e6d + 9a99ece commit a62d099

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

unity_app_generator/interface.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
# Defaulty name of place where application generation state data is kept
1515
DEFAULT_STATE_DIRECTORY = ".unity_app_gen"
1616

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

2020
if state_directory is not None:
2121
return os.path.realpath(state_directory)
22+
23+
if destination_directory is not None:
24+
return os.path.realpath(os.path.join(destination_directory, DEFAULT_STATE_DIRECTORY))
2225

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

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

36-
state_dir = state_directory_path(state_directory)
39+
state_dir = state_directory_path(state_directory, destination_directory)
3740

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

unity_app_generator/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__="1.1.0"
1+
__version__="1.1.1"

0 commit comments

Comments
 (0)