mlgym-deploy 3.3.24 → 3.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1722,6 +1722,16 @@ async function initProject(args) {
|
|
|
1722
1722
|
|
|
1723
1723
|
// Initialize local git repository if needed
|
|
1724
1724
|
const absolutePath = path.resolve(local_path);
|
|
1725
|
+
|
|
1726
|
+
// Fix git "dubious ownership" error when running as different user
|
|
1727
|
+
// This allows git operations even if directory is owned by another user
|
|
1728
|
+
console.error('Configuring git safe.directory...');
|
|
1729
|
+
try {
|
|
1730
|
+
await execAsync(`git config --global --add safe.directory "${absolutePath}"`);
|
|
1731
|
+
} catch (safeErr) {
|
|
1732
|
+
console.error('Note: Could not set safe.directory:', safeErr.message);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1725
1735
|
try {
|
|
1726
1736
|
await execAsync('git status', { cwd: absolutePath });
|
|
1727
1737
|
console.error('Directory is already a git repository');
|
|
@@ -1894,7 +1904,7 @@ async function initProject(args) {
|
|
|
1894
1904
|
deploymentStatus = {
|
|
1895
1905
|
status: 'pending',
|
|
1896
1906
|
message: 'Deployment is still in progress. Check status later.',
|
|
1897
|
-
expected_url:
|
|
1907
|
+
expected_url: project.deployment_url || null
|
|
1898
1908
|
};
|
|
1899
1909
|
}
|
|
1900
1910
|
}
|
|
@@ -1913,7 +1923,7 @@ async function initProject(args) {
|
|
|
1913
1923
|
description: project.description,
|
|
1914
1924
|
git_url: gitUrl,
|
|
1915
1925
|
deployment_enabled: enable_deployment,
|
|
1916
|
-
deployment_url:
|
|
1926
|
+
deployment_url: project.deployment_url || null
|
|
1917
1927
|
},
|
|
1918
1928
|
git_operations: gitSteps,
|
|
1919
1929
|
deployment: deploymentStatus,
|
|
@@ -1924,7 +1934,7 @@ async function initProject(args) {
|
|
|
1924
1934
|
'Future updates: git push mlgym main'
|
|
1925
1935
|
] : [
|
|
1926
1936
|
enable_deployment ? 'Deployment triggered - check URL in a few minutes' : 'Project ready',
|
|
1927
|
-
enable_deployment ? `Expected URL:
|
|
1937
|
+
enable_deployment && project.deployment_url ? `Expected URL: ${project.deployment_url}` : null,
|
|
1928
1938
|
'To update: git push mlgym main'
|
|
1929
1939
|
].filter(Boolean))
|
|
1930
1940
|
: [
|
package/package.json
CHANGED