Skip to content

Commit

Permalink
fix cli and gradle location for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Dec 19, 2023
1 parent d547ad2 commit 3459de2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/sdk-android/src/deviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export const launchAndroidSimulator = async (
target: true | { name: string } | string,
isIndependentThread = false
) => {
logTask('launchAndroidSimulator', `target:${target} independentThread:${!!isIndependentThread}`);
logTask(
'launchAndroidSimulator',
`target:${typeof target === 'object' ? target?.name : target} independentThread:${!!isIndependentThread}`
);
let newTarget: { name: string } | string;
if (target === true) {
const {
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-android/src/gradleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,9 @@ export const parseSettingsGradleSync = (c: Context) => {
const rnCliLocation = doResolve('@react-native-community/cli-platform-android', true, { forceForwardPaths: true });
const rnGradlePluginLocation = doResolve('@react-native/gradle-plugin', true, { forceForwardPaths: true });

const rnCliRelativePath = (!!rnCliLocation && path.relative(appFolder, rnCliLocation)) || '';
const rnCliRelativePath = (!!rnCliLocation && path.relative(appFolder, rnCliLocation).replace(/\\/g, '/')) || '';
const rnGradlePluginRelativePath =
(!!rnGradlePluginLocation && path.relative(appFolder, rnGradlePluginLocation)) || '';
(!!rnGradlePluginLocation && path.relative(appFolder, rnGradlePluginLocation).replace(/\\/g, '/')) || '';

const injects = [
{
Expand Down

0 comments on commit 3459de2

Please sign in to comment.